postgresql/src/backend/utils
Tom Lane c299477229 Fix filling of postmaster.pid in bootstrap/standalone mode.
We failed to ever fill the sixth line (LISTEN_ADDR), which caused the
attempt to fill the seventh line (SHMEM_KEY) to fail, so that the shared
memory key never got added to the file in standalone mode.  This has been
broken since we added more content to our lock files in 9.1.

To fix, tweak the logic in CreateLockFile to add an empty LISTEN_ADDR
line in standalone mode.  This is a tad grotty, but since that function
already knows almost everything there is to know about the contents of
lock files, it doesn't seem that it's any better to hack it elsewhere.

It's not clear how significant this bug really is, since a standalone
backend should never have any children and thus it seems not critical
to be able to check the nattch count of the shmem segment externally.
But I'm going to back-patch the fix anyway.

This problem had escaped notice because of an ancient (and in hindsight
pretty dubious) decision to suppress LOG-level messages by default in
standalone mode; so that the elog(LOG) complaint in AddToDataDirLockFile
that should have warned of the problem didn't do anything.  Fixing that
is material for a separate patch though.
2012-12-16 15:02:49 -05:00
..
adt Support automatically-updatable views. 2012-12-08 18:26:21 -05:00
cache Fix assorted bugs in CREATE/DROP INDEX CONCURRENTLY. 2012-11-28 21:26:01 -05:00
error Use correct text domain for translating errcontext() messages. 2012-11-12 17:07:29 +02:00
fmgr Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
hash Add defenses against integer overflow in dynahash numbuckets calculations. 2012-12-11 22:09:05 -05:00
init Fix filling of postmaster.pid in bootstrap/standalone mode. 2012-12-16 15:02:49 -05:00
mb Tidy up from frontend Assert change. 2012-12-16 12:22:57 -05:00
misc Background worker processes 2012-12-06 17:47:30 -03:00
mmgr COPY FREEZE and mark committed on fresh tables. 2012-12-01 12:54:20 +00:00
resowner Split resowner.h 2012-08-28 18:02:07 -04:00
sort Add support for easily declaring static inline functions 2012-10-08 16:28:01 -03:00
time COPY FREEZE and mark committed on fresh tables. 2012-12-01 12:54:20 +00:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
errcodes.txt Code review for 64-bit-large-object patch. 2012-10-08 18:24:32 -04:00
Gen_dummy_probes.sed Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Gen_fmgrtab.pl Run updated copyright.pl on HEAD and 9.2 trees, updating the psql 2012-07-06 12:28:18 -04:00
generate-errcodes.pl Run newly-configured perltidy script on Perl files. 2012-07-04 21:47:49 -04:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
probes.d Make group commit more effective. 2012-01-30 16:53:48 +02:00