1. 15 5月, 2012 2 次提交
    • P
      Remove unused AC_DEFINE symbols · ff4628f3
      Peter Eisentraut 提交于
      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
    • T
      For testing purposes, reinsert a timeout in pgstat.c's wait call. · d461d050
      Tom Lane 提交于
      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
  2. 14 5月, 2012 10 次提交
    • T
      Force pgwin32_recv into nonblock mode when called from pgstat.c. · f1ca5154
      Tom Lane 提交于
      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
    • H
      Remove unnecessary pg_verifymbstr() calls from tsvector/query in functions. · f15c2eae
      Heikki Linnakangas 提交于
      The input should've been validated well before it hits the input function.
      Doing so again is a waste of cycles.
      f15c2eae
    • H
      Update comments that became out-of-date with the PGXACT struct. · 9e4637bf
      Heikki Linnakangas 提交于
      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
    • P
      Remove leftovers of BeOS port · 64f09ca3
      Peter Eisentraut 提交于
      These should have been removed when the BeOS port was removed in
      44f90212.
      64f09ca3
    • P
      6bf1e766
    • P
      pg_ctl: Improve --help output · 2a7f6366
      Peter Eisentraut 提交于
      All other --help output has = signs between long options and their
      arguments, so do it here as well.
      2a7f6366
    • T
      Add some temporary instrumentation to pgstat.c. · 7d88bb73
      Tom Lane 提交于
      Log main-loop blocking events and the results of inquiry messages.
      This is to get some clarity as to what's happening on those Windows
      buildfarm members that still don't like the latch-ified stats collector.
      This bulks up the postmaster log a tad, so I won't leave it in place for
      long.
      7d88bb73
    • T
      Fix DROP TABLESPACE to unlink symlink when directory is not there. · b8347138
      Tom Lane 提交于
      If the tablespace directory is missing entirely, we allow DROP TABLESPACE
      to go through, on the grounds that it should be possible to clean up the
      catalog entry in such a situation.  However, we forgot that the pg_tblspc
      symlink might still be there.  We should try to remove the symlink too
      (but not fail if it's no longer there), since not doing so can lead to
      weird behavior subsequently, as per report from Michael Nolan.
      
      There was some discussion of adding dependency links to prevent DROP
      TABLESPACE when the catalogs still contain references to the tablespace.
      That might be worth doing too, but it's an orthogonal question, and in
      any case wouldn't be back-patchable.
      
      Back-patch to 9.0, which is as far back as the logic looks like this.
      We could possibly do something similar in 8.x, but given the lack of
      reports I'm not sure it's worth the trouble, and anyway the case could
      not arise in the form the logic is meant to cover (namely, a post-DROP
      transaction rollback having resurrected the pg_tablespace entry after
      some or all of the filesystem infrastructure is gone).
      b8347138
    • T
      Re-revert stats collector latch changes. · 966970ed
      Tom Lane 提交于
      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
    • T
      Attempt to fix some issues in our Windows socket code. · b85427f2
      Tom Lane 提交于
      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
  3. 13 5月, 2012 4 次提交
    • T
      Fix bogus declaration of local variable. · fd350ef3
      Tom Lane 提交于
      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
    • T
      Avoid unnecessary process wakeups in the log collector. · 398b2401
      Tom Lane 提交于
      syslogger was coded to wake up once per second whether there was anything
      useful to do or not.  As part of our campaign to reduce the server's idle
      power consumption, change it to use a latch for waiting.  Now, in the
      absence of any data to log or any signals to service, it will only wake up
      at the programmed logfile rotation times (if any).
      398b2401
    • P
      Remove unused AC_SUBST variables · 7b85527e
      Peter Eisentraut 提交于
      These were apparently never used.  The AC_SUBST was probably just
      added in a copy-and-paste manner.  (The shell variables continue to be
      used inside configure.  The change is just that we don't need them
      outside of configure.)
      7b85527e
    • T
      Fix WaitLatchOrSocket to handle EOF on socket correctly. · 31ad6553
      Tom Lane 提交于
      When using poll(), EOF on a socket is reported with the POLLHUP not
      POLLIN flag (at least on Linux).  WaitLatchOrSocket failed to check
      this bit, causing it to go into a busy-wait loop if EOF occurs.
      We earlier fixed the same mistake in the test for the state of the
      postmaster_alive socket, but missed it for the caller-supplied socket.
      Fortunately, this error is new in 9.2, since 9.1 only had a select()
      based code path not a poll() based one.
      31ad6553
  4. 12 5月, 2012 8 次提交
    • B
      Update group commit release note item. · d36eaa21
      Bruce Momjian 提交于
      d36eaa21
    • S
      867540b4
    • P
      Fix obsolescent C declaration syntax · afe86a9e
      Peter Eisentraut 提交于
      gcc -Wextra/-Wold-style-declaration thinks that "inline" should go
      before the function return type.
      afe86a9e
    • T
      Explain compatibility item about language names a bit more. · a5985a96
      Tom Lane 提交于
      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
    • T
      Update example of process titles shown by "ps". · f35ebd2a
      Tom Lane 提交于
      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
    • T
      Cosmetic adjustments for postmaster's handling of checkpointer. · d0c231d1
      Tom Lane 提交于
      Correct some comments, order some operations a bit more consistently.
      No functional changes.
      d0c231d1
    • P
      PL/Python: Adjust the regression tests for Python 3.3 · 2cfb1c6f
      Peter Eisentraut 提交于
      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
    • T
      Fix contrib/citext's upgrade script to handle array and domain cases. · 63fecc91
      Tom Lane 提交于
      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
  5. 11 5月, 2012 16 次提交