1. 13 May, 2012 3 commits
    • Tom Lane's avatar
      Re-revert stats collector latch changes. · 966970ed
      Tom Lane authored
      This reverts commit cb2f2873, restoring
      the latch-ified stats collector logic.  We'll soon see if this works any
      better on the Windows buildfarm machines.
      966970ed
    • Tom Lane's avatar
      Attempt to fix some issues in our Windows socket code. · b85427f2
      Tom Lane authored
      Make sure WaitLatchOrSocket regards FD_CLOSE as a read-ready condition.
      We might want to tweak this further, but it was surely wrong as-is.
      
      Make pgwin32_waitforsinglesocket detach its private event object from the
      passed socket before returning.  I suspect that failure to do so leads
      to race conditions when other code (such as WaitLatchOrSocket) attaches
      a different event object to the same socket.  Moreover, the existing
      coding meant that repeated calls to pgwin32_waitforsinglesocket would
      perform ResetEvent on an event actively connected to a socket, which
      is rumored to be an unsafe practice; the WSAEventSelect documentation
      appears to recommend against this, though it does not say not to do it
      in so many words.
      
      Also, uniformly use the coding pattern "WSAEventSelect(s, NULL, 0)" to
      detach events from sockets, rather than passing the event in the second
      parameter.  The WSAEventSelect documentation says that the second parameter
      is ignored if the third is 0, so theoretically this should make no
      difference.  However, elsewhere on the same reference page the use of NULL
      in this context is recommended, and I have found suggestions on the net
      that some versions of Windows have bugs with a non-NULL second parameter
      in this usage.
      
      Some other mostly-cosmetic cleanup, such as using the right one of
      WSAGetLastError and GetLastError for reporting errors from these functions.
      b85427f2
    • Tom Lane's avatar
      Fix bogus declaration of local variable. · fd350ef3
      Tom Lane authored
      rc should be an int here, not a pgsocket.  Fairly harmless as long as
      pgsocket is an integer type, but nonetheless wrong.  Error introduced
      in commit 87091cb1.
      fd350ef3
  2. 12 May, 2012 6 commits
  3. 11 May, 2012 10 commits
    • Tom Lane's avatar
      Explain compatibility item about language names a bit more. · a5985a96
      Tom Lane authored
      Since we've got an "open items" list item about this, apparently some
      people are pretty worried about it.
      
      In passing remove a lot of trailing whitespace.
      a5985a96
    • Tom Lane's avatar
      Update example of process titles shown by "ps". · f35ebd2a
      Tom Lane authored
      This example was quite old: it lacked the WAL writer and autovac launcher
      as well as the more recently added checkpointer.  Linux "ps" seems to show
      slightly different stuff now too.
      f35ebd2a
    • Tom Lane's avatar
      Cosmetic adjustments for postmaster's handling of checkpointer. · d0c231d1
      Tom Lane authored
      Correct some comments, order some operations a bit more consistently.
      No functional changes.
      d0c231d1
    • Peter Eisentraut's avatar
      PL/Python: Adjust the regression tests for Python 3.3 · 2cfb1c6f
      Peter Eisentraut authored
      The string representation of ImportError changed.  Remove printing
      that; it's not necessary for the test.
      
      The order in which members of a dict are printed changed.  But this
      was always implementation-dependent, so we have just been lucky for a
      long time.  Do the printing the hard way to ensure sorted order.
      2cfb1c6f
    • Tom Lane's avatar
      Fix contrib/citext's upgrade script to handle array and domain cases. · 63fecc91
      Tom Lane authored
      We previously recognized that citext wouldn't get marked as collatable
      during pg_upgrade from a pre-9.1 installation, and hacked its
      create-from-unpackaged script to manually perform the necessary catalog
      adjustments.  However, we overlooked the fact that domains over citext,
      as well as the citext[] array type, need the same adjustments.  Extend
      the script to handle those cases.
      
      Also, the documentation suggested that this was only an issue in pg_upgrade
      scenarios, which is quite wrong; loading any dump containing citext from a
      pre-9.1 server will also result in the type being wrongly marked.
      
      I approached the documentation problem by changing the 9.1.2 release note
      paragraphs about this issue, which is historically inaccurate.  But it
      seems better than having the information scattered in multiple places, and
      leaving incorrect info in the 9.1.2 notes would be bad anyway.  We'll still
      need to mention the issue again in the 9.1.4 notes, but perhaps they can
      just reference 9.1.2 for fix instructions.
      
      Per report from Evan Carroll.  Back-patch into 9.1.
      63fecc91
    • Robert Haas's avatar
      Prevent loss of init fork when truncating an unlogged table. · 1331cc6c
      Robert Haas authored
      Fixes bug #6635, reported by Akira Kurosawa.
      1331cc6c
    • Simon Riggs's avatar
      Remove extraneous #include "storage/proc.h" · b762e8f5
      Simon Riggs authored
      b762e8f5
    • Simon Riggs's avatar
    • Heikki Linnakangas's avatar
      On GiST page split, release the locks on child pages before recursing up. · 3652d72d
      Heikki Linnakangas authored
      When inserting the downlinks for a split gist page, we used hold the locks
      on the child pages until the insertion into the parent - and recursively its
      parent if it had to be split too - were all completed. Change that so that
      the locks on child pages are released after the insertion in the immediate
      parent is done, before recursing further up the tree.
      
      This reduces the number of lwlocks that are held simultaneously. Holding
      many locks is bad for concurrency, and in extreme cases you can even hit
      the limit of 100 simultaneously held lwlocks in a backend. If you're really
      unlucky, you can hit the limit while in a critical section, which brings
      down the whole system.
      
      This fixes bug #6629 reported by Tom Forbes. Backpatch to 9.1. The page
      splitting code was rewritten in 9.1, and the old code did not have this
      problem.
      3652d72d
    • Tom Lane's avatar
      Improve discussion of setting server parameters. · 817ec1bc
      Tom Lane authored
      Rewrite description of "include_if_exists" for clarity.  Add subsection
      headings to make the structure of the page a little clearer.  A couple
      other minor improvements too.
      
      Josh Kupershmidt and Tom Lane
      817ec1bc
  4. 10 May, 2012 21 commits