1. 22 May, 2012 9 commits
  2. 21 May, 2012 4 commits
  3. 19 May, 2012 5 commits
  4. 18 May, 2012 2 commits
    • Peter Eisentraut's avatar
    • Heikki Linnakangas's avatar
      Fix bug in gistRelocateBuildBuffersOnSplit(). · 1d27dcf5
      Heikki Linnakangas authored
      When we create a temporary copy of the old node buffer, in stack, we mustn't
      leak that into any of the long-lived data structures. Before this patch,
      when we called gistPopItupFromNodeBuffer(), it got added to the array of
      "loaded buffers". After gistRelocateBuildBuffersOnSplit() exits, the
      pointer added to the loaded buffers array points to garbage. Often that goes
      unnotied, because when we go through the array of loaded buffers to unload
      them, buffers with a NULL pageBuffer are ignored, which can often happen by
      accident even if the pointer points to garbage.
      
      This patch fixes that by marking the temporary copy in stack explicitly as
      temporary, and refrain from adding buffers marked as temporary to the array
      of loaded buffers.
      
      While we're at it, initialize nodeBuffer->pageBlocknum to InvalidBlockNumber
      and improve comments a bit. This isn't strictly necessary, but makes
      debugging easier.
      1d27dcf5
  5. 17 May, 2012 3 commits
  6. 16 May, 2012 3 commits
  7. 15 May, 2012 8 commits
  8. 14 May, 2012 6 commits
    • Tom Lane's avatar
      Assert that WaitLatchOrSocket callers cannot wait only for writability. · e42a21b9
      Tom Lane authored
      Since we have chosen to report socket EOF and error conditions via the
      WL_SOCKET_READABLE flag bit, it's unsafe to wait only for
      WL_SOCKET_WRITEABLE; the caller would never be notified of the socket
      condition, and in some of these implementations WaitLatchOrSocket would
      busy-wait until something else happens.  Add this restriction to the API
      specification, and add Asserts to check that callers don't try to do that.
      
      At some point we might want to consider adjusting the API to relax this
      restriction, but until we have an actual use case for waiting on a
      write-only socket, it seems premature to design a solution.
      e42a21b9
    • Peter Eisentraut's avatar
      Remove unused AC_DEFINE symbols · ff4628f3
      Peter Eisentraut authored
      ENABLE_DTRACE            unused as of a7b7b07a
      HAVE_ERR_SET_MARK        unused as of 4ed4b6c5
      HAVE_FCVT                unused as of 4553e1d8
      HAVE_STRUCT_SOCKADDR_UN  unused as of b4cea00a
      HAVE_SYSCONF             unused as of f83356c7
      TM_IN_SYS_TIME           never used, obsolescent per Autoconf documentation
      ff4628f3
    • Tom Lane's avatar
      For testing purposes, reinsert a timeout in pgstat.c's wait call. · d461d050
      Tom Lane authored
      Test results from buildfarm members mastodon/narwhal (Windows Server 2003)
      make it look like that platform just plain loses FD_READ events
      occasionally, and the only reason our previous coding seemed to work was
      that it timed out every couple of seconds and retried the whole operation.
      Try to verify this by reinserting a finite timeout into the pgstat loop.
      This isn't meant to be a permanent patch either, just to confirm or
      disprove a theory.
      d461d050
    • Tom Lane's avatar
      Force pgwin32_recv into nonblock mode when called from pgstat.c. · f1ca5154
      Tom Lane authored
      This should get rid of the usage of pgwin32_waitforsinglesocket entirely,
      and perhaps thereby remove the race condition that's evidently still
      present on some versions of Windows.  The previous arrangement was a bit
      unsafe anyway, since waiting at the recv() would not allow pgstat to notice
      postmaster death.
      f1ca5154
    • Heikki Linnakangas's avatar
      Remove unnecessary pg_verifymbstr() calls from tsvector/query in functions. · f15c2eae
      Heikki Linnakangas authored
      The input should've been validated well before it hits the input function.
      Doing so again is a waste of cycles.
      f15c2eae
    • Heikki Linnakangas's avatar
      Update comments that became out-of-date with the PGXACT struct. · 9e4637bf
      Heikki Linnakangas authored
      When the "hot" members of PGPROC were split off to separate PGXACT structs,
      many PGPROC fields referred to in comments were moved to PGXACT, but the
      comments were neglected in the commit. Mostly this is just a search/replace
      of PGPROC with PGXACT, but the way the dummy PGPROC entries are created for
      prepared transactions changed more, making some of the comments totally
      bogus.
      
      Noah Misch
      9e4637bf