1. 07 Jul, 2015 2 commits
  2. 06 Jul, 2015 4 commits
    • Heikki Linnakangas's avatar
      Turn install.bat into a pure one line wrapper fort he perl script. · 6c534fd6
      Heikki Linnakangas authored
      Build.bat and vcregress.bat got similar treatment years ago. I'm not sure
      why install.bat wasn't treated at the same time, but it seems like a good
      idea anyway.
      
      The immediate problem with the old install.bat was that it had quoting
      issues, and wouldn't work if the target directory's name contained spaces.
      This fixes that problem.
      6c534fd6
    • Heikki Linnakangas's avatar
      Call getsockopt() on the correct socket. · 8e33fc17
      Heikki Linnakangas authored
      We're interested in the buffer size of the socket that's connected to the
      client, not the one that's listening for new connections. It happened to
      work, as default buffer size is the same on both, but it was clearly not
      wrong.
      
      Spotted by Tom Lane
      8e33fc17
    • Heikki Linnakangas's avatar
      Don't set SO_SNDBUF on recent Windows versions that have a bigger default. · 4f33621f
      Heikki Linnakangas authored
      It's unnecessary to set it if the default is higher in the first place.
      Furthermore, setting SO_SNDBUF disables the so-called "dynamic send
      buffering" feature, which hurts performance further. This can be seen
      especially when the network between the client and the server has high
      latency.
      
      Chen Huajun
      4f33621f
    • Fujii Masao's avatar
      Remove incorrect warning from pg_archivecleanup document. · 906e9249
      Fujii Masao authored
      The .backup file name can be passed to pg_archivecleanup even if
      it includes the extension which is specified in -x option.
      However, previously the document incorrectly warned a user
      not to do that.
      
      Back-patch to 9.2 where pg_archivecleanup's -x option and
      the warning were added.
      906e9249
  3. 05 Jul, 2015 4 commits
    • Tom Lane's avatar
      Make a editorial pass over pgbench's error messages. · 22ba5563
      Tom Lane authored
      The lack of consistency, and lack of attention to our message style
      guidelines, was a bit striking.  Try to make 'em better.
      22ba5563
    • Tom Lane's avatar
      Fix some typos in regression test comments. · 55165497
      Tom Lane authored
      Back-patch to avoid unnecessary cross-branch differences.
      
      CharSyam
      55165497
    • Tom Lane's avatar
      Further reduce overhead for passing plpgsql variables to the executor. · 6c82d8d1
      Tom Lane authored
      This builds on commit 21dcda27 by keeping
      a plpgsql function's shared ParamListInfo's entries for simple variables
      (PLPGSQL_DTYPE_VARs) valid at all times.  That adds a few cycles to each
      assignment to such variables, but saves significantly more cycles each time
      they are used; so except in the pathological case of many dead stores, this
      should always be a win.  Initial testing says it's good for about a 10%
      speedup of simple calculations; more in large functions with many datums.
      
      We can't use this method for row/record references unfortunately, so what
      we do for those is reset those ParamListInfo slots after use; which we
      can skip doing unless some of them were actually evaluated during the
      previous evaluation call.  So this should frequently be a win as well,
      while worst case is that it's similar cost to the previous approach.
      
      Also, closer study suggests that the previous method of instantiating a
      new ParamListInfo array per evaluation is actually probably optimal for
      cursor-opening executor calls.  The reason is that whatever is visible in
      the array is going to get copied into the cursor portal via copyParamList.
      So if we used the function's main ParamListInfo for those calls, we'd end
      up with all of its DTYPE_VAR vars getting copied, which might well include
      large pass-by-reference values that the cursor actually has no need for.
      To avoid a possible net degradation in cursor cases, go back to creating
      and filling a private ParamListInfo in those cases (which therefore will be
      exactly the same speed as before 21dcda27).  We still get some benefit
      out of this though, because this approach means that we only have to defend
      against copyParamList's try-to-fetch-every-slot behavior in the case of an
      unshared ParamListInfo; so plpgsql_param_fetch() can skip testing
      expr->paramnos in the common case.
      
      To ensure that the main ParamListInfo's image of a DTYPE_VAR datum is
      always valid, all assignments to such variables are now funneled through
      assign_simple_var().  But this makes for cleaner and shorter code anyway.
      6c82d8d1
    • Tom Lane's avatar
      Fix bad grammar in brin.sgml. · 25240462
      Tom Lane authored
      Christoph Berg
      25240462
  4. 03 Jul, 2015 6 commits
  5. 02 Jul, 2015 15 commits
  6. 01 Jul, 2015 3 commits
    • Tom Lane's avatar
      Don't leave pg_hba and pg_ident data lying around in running backends. · 1e24cf64
      Tom Lane authored
      Free the contexts holding this data after we're done using it, by the
      expedient of attaching them to the PostmasterContext which we were
      already taking care to delete (and where, indeed, this data used to live
      before commits e5e2fc84 and 7c45e3a3).  This saves a
      probably-usually-negligible amount of space per running backend.  It also
      avoids leaving potentially-security-sensitive data lying around in memory
      in processes that don't need it.  You'd have to be unusually paranoid to
      think that that amounts to a live security bug, so I've not gone so far as
      to forcibly zero the memory; but there surely isn't a good reason to keep
      this data around.
      
      Arguably this is a memory management bug in the aforementioned commits,
      but it doesn't seem important enough to back-patch.
      1e24cf64
    • Tom Lane's avatar
      Make sampler_random_fract() actually obey its API contract. · d7c19d68
      Tom Lane authored
      This function is documented to return a value in the range (0,1),
      which is what its predecessor anl_random_fract() did.  However, the
      new version depends on pg_erand48() which returns a value in [0,1).
      The possibility of returning zero creates hazards of division by zero
      or trying to compute log(0) at some call sites, and it might well
      break third-party modules using anl_random_fract() too.  So let's
      change it to never return zero.  Spotted by Coverity.
      
      Michael Paquier, cosmetically adjusted by me
      d7c19d68
    • Fujii Masao's avatar
      Make XLogFileCopy() look the same as in 9.4. · 82173708
      Fujii Masao authored
      XLogFileCopy() was changed heavily in commit de768844. However it was
      partially reverted in commit 7abc6859 and most of those changes to
      XLogFileCopy() were no longer needed. Then commit 7cbee7c0 removed
      those unnecessary code, but XLogFileCopy() looked different in master
      and 9.4 though the contents are almost the same.
      
      This patch makes XLogFileCopy() look the same in master and back-branches,
      which makes back-patching easier, per discussion on pgsql-hackers.
      Back-patch to 9.5.
      
      Discussion: 55760844.7090703@iki.fi
      
      Michael Paquier
      82173708
  7. 30 Jun, 2015 6 commits