1. 05 Jul, 2015 1 commit
  2. 03 Jul, 2015 6 commits
  3. 02 Jul, 2015 15 commits
  4. 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
  5. 30 Jun, 2015 10 commits
  6. 29 Jun, 2015 5 commits
    • Heikki Linnakangas's avatar
      Initialize GIN metapage correctly when replaying metapage-update WAL record. · 47fe4d25
      Heikki Linnakangas authored
      I broke this with my WAL format refactoring patch. Before that, the metapage
      was read from disk, and modified in-place regardless of the LSN. That was
      always a bit silly, as there's no need to read the old page version from
      disk disk when we're overwriting it anyway. So that was changed in 9.5, but
      I failed to add a GinInitPage call to initialize the page-headers correctly.
      Usually you wouldn't notice, because the metapage is already in the page
      cache and is not zeroed.
      
      One way to reproduce this is to perform a VACUUM on an already vacuumed
      table (so that the vacuum has no real work to do), immediately after a
      checkpoint, and then perform an immediate shutdown. After recovery, the
      page headers of the metapage will be incorrectly all-zeroes.
      
      Reported by Jeff Janes
      47fe4d25
    • Tom Lane's avatar
      Stamp 9.5alpha1. · f78329d5
      Tom Lane authored
      f78329d5
    • Tom Lane's avatar
      Desultory review of 9.5 release notes. · 85c25fdb
      Tom Lane authored
      Minor corrections and clarifications.  Notably, for stuff that got moved
      out of contrib, make sure it's documented somewhere other than "Additional
      Modules".
      
      I'm sure these need more work, but that's all I have time for today.
      85c25fdb
    • Tom Lane's avatar
      Code + docs review for escaping of option values (commit 11a020eb). · cbc8d656
      Tom Lane authored
      Avoid memory leak from incorrect choice of how to free a StringInfo
      (resetStringInfo doesn't do it).  Now that pg_split_opts doesn't scribble
      on the optstr, mark that as "const" for clarity.  Attach the commentary in
      protocol.sgml to the right place, and add documentation about the
      user-visible effects of this change on postgres' -o option and libpq's
      PGOPTIONS option.
      cbc8d656
    • Andres Freund's avatar
      Replace ia64 S_UNLOCK compiler barrier with a full memory barrier. · 07cb8b02
      Andres Freund authored
      _Asm_sched_fence() is just a compiler barrier, not a memory barrier. But
      spinlock release on IA64 needs, at the very least, release
      semantics. Use a full barrier instead.
      
      This might be the cause for the occasional failures on buildfarm member
      anole.
      
      Discussion: 20150629101108.GB17640@alap3.anarazel.de
      07cb8b02