1. 07 May, 2014 10 commits
    • Robert Haas's avatar
      Detach shared memory from bgworkers without shmem access. · 4d155d8b
      Robert Haas authored
      Since the postmaster won't perform a crash-and-restart sequence
      for background workers which don't request shared memory access,
      we'd better make sure that they can't corrupt shared memory.
      
      Patch by me, review by Tom Lane.
      4d155d8b
    • Tom Lane's avatar
      Fix failure to set ActiveSnapshot while rewinding a cursor. · 04e5025b
      Tom Lane authored
      ActiveSnapshot needs to be set when we call ExecutorRewind because some
      plan node types may execute user-defined functions during their ReScan
      calls (nodeLimit.c does so, at least).  The wisdom of that is somewhat
      debatable, perhaps, but for now the simplest fix is to make sure the
      required context is valid.  Failure to do this typically led to a
      null-pointer-dereference core dump, though it's possible that in more
      complex cases a function could be executed with the wrong snapshot
      leading to very subtle misbehavior.
      
      Per report from Leif Jensen.  It's been broken for a long time, so
      back-patch to all active branches.
      04e5025b
    • Robert Haas's avatar
      Never crash-and-restart for bgworkers without shared memory access. · e2ce9aa2
      Robert Haas authored
      The motivation for a crash and restart cycle when a backend dies is
      that it might have corrupted shared memory on the way down; and we
      can't recover reliably except by reinitializing everything.  But that
      doesn't apply to processes that don't touch shared memory.  Currently,
      there's nothing to prevent a background worker that doesn't request
      shared memory access from touching shared memory anyway, but that's a
      separate bug.
      
      Previous to this commit, the coding in postmaster.c was inconsistent:
      an exit status other than 0 or 1 didn't provoke a crash-and-restart,
      but failure to release the postmaster child slot did.  This change
      makes those cases consistent.
      e2ce9aa2
    • Tom Lane's avatar
      1891b415
    • Jeff Davis's avatar
      Fix interval test, which was broken for floating-point timestamps. · 348aa75a
      Jeff Davis authored
      Commit 4318daec introduced a test that
      couldn't be made consistent between integer and floating-point
      timestamps.
      
      It was designed to test the longest possible interval output length,
      so removing four zeros from the number of hours, as this patch does,
      is not ideal. But the test still has some utility for its original
      purpose, and there aren't a lot of other good options.
      
      Noah Misch suggested a different approach where we test that the
      output either matches what we expect from integer timestamps or what
      we expect from floating-point timestamps. That seemed to obscure an
      otherwise simple test, however.
      
      Reviewed by Tom Lane and Noah Misch.
      348aa75a
    • Tom Lane's avatar
      hash_any returns Datum, not uint32 (and definitely not "int"). · 2c22afaa
      Tom Lane authored
      The coding in JsonbHashScalarValue might have accidentally failed to fail
      given current representational choices, but the key word there would be
      "accidental".  Insert the appropriate datatype conversion macro.  And
      use the right conversion macro for hash_numeric's result, too.
      
      In passing make the code a bit cleaner and less repetitive by factoring
      out the xor step from the switch.
      2c22afaa
    • Jeff Davis's avatar
      Improve comment for tricky aspect of index-only scans. · 35c0cd3b
      Jeff Davis authored
      Index-only scans avoid taking a lock on the VM buffer, which would
      cause a lot of contention. To be correct, that requires some intricate
      assumptions that weren't completely documented in the previous
      comment.
      
      Reviewed by Robert Haas.
      35c0cd3b
    • Peter Eisentraut's avatar
      doc: Fix DocBook XML validity · 3a9d430a
      Peter Eisentraut authored
      The main problem is that DocBook SGML allows indexterm elements just
      about everywhere, but DocBook XML is stricter.  For example, this common
      pattern
      
          <varlistentry>
           <indexterm>...</indexterm>
           <term>...</term>
           ...
          </varlistentry>
      
      needs to be changed to something like
      
          <varlistentry>
           <term>...<indexterm>...</indexterm></term>
           ...
          </varlistentry>
      
      See also bb4eefe7.
      
      There is currently nothing in the build system that enforces that things
      stay valid, because that requires additional tools and will receive
      separate consideration.
      3a9d430a
    • Bruce Momjian's avatar
      With ecpg exclusion removed, re-run pgindent for 9.4 · 84288a86
      Bruce Momjian authored
      Report by Tom Lane
      84288a86
    • Bruce Momjian's avatar
      Remove pgindent ecpg exclusion pattern · 9516668e
      Bruce Momjian authored
      Report by Tom Lane
      9516668e
  2. 06 May, 2014 17 commits
  3. 05 May, 2014 13 commits