postgresql/src
Tom Lane 3c485ca8e6 Further improvements in pg_ctl's new wait-for-postmaster-start logic.
Add a postmaster_is_alive() test to the wait loop, so that we stop waiting
if the postmaster dies without removing its pidfile.  Unfortunately this
only helps after the postmaster has created its pidfile, since until then
we don't know which PID to check.  But if it never does create the pidfile,
we can give up in a relatively short time, so this is a useful addition
in practice.  Per suggestion from Fujii Masao, though this doesn't look
very much like his patch.

In addition, improve pg_ctl's ability to cope with pre-existing pidfiles.
Such a file might or might not represent a live postmaster that is going to
block our postmaster from starting, but the previous code pre-judged the
situation and gave up waiting immediately.  Now, we will wait for up to 5
seconds to see if our postmaster overwrites such a file.  This issue
interacts with Fujii's patch because we would make the wrong conclusion
if we did the postmaster_is_alive() test with a pre-existing PID.

All of this could be improved if we rewrote start_postmaster() so that it
could report the child postmaster's PID, so that we'd know a-priori the
correct PID to test with postmaster_is_alive().  That looks like a bit too
much change for so late in the 9.1 development cycle, unfortunately.
2011-06-01 13:09:07 -04:00
..
backend Protect GIST logic that assumes penalty values can't be negative. 2011-05-31 17:53:45 -04:00
bin Further improvements in pg_ctl's new wait-for-postmaster-start logic. 2011-06-01 13:09:07 -04:00
include Replace use of credential control messages with getsockopt(LOCAL_PEERCRED). 2011-05-31 16:10:46 -04:00
interfaces Replace use of credential control messages with getsockopt(LOCAL_PEERCRED). 2011-05-31 16:10:46 -04:00
makefiles Rewrite installation makefile rules without for loops 2011-05-02 01:05:08 +03:00
pl Remove usage of &PL_sv_undef in hashes and arrays 2011-05-30 12:42:48 -04:00
port Assorted minor changes to silence Windows compiler warnings. 2011-04-25 12:56:53 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test The row-version chaining in Serializable Snapshot Isolation was still wrong. 2011-05-30 20:47:17 +03:00
timezone Split PGC_S_DEFAULT into two values, for true boot_val vs computed default. 2011-05-11 19:57:38 -04:00
tools Convert builddoc.bat into a perl script that actually works. 2011-05-25 00:21:07 -04:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Rename pg_regress option --multibyte to --encoding 2011-04-15 08:42:05 +03:00
Makefile.shlib Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00