Fix filling of postmaster.pid in bootstrap/standalone mode.
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.

greenplum-db/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,lisakowen/gpdb,oberstet/postgres-xl,ovr/postgres-xl,Postgres-XL/Postgres-XL,Postgres-XL/Postgres-XL,adam8157/gpdb,jmcatamney/gpdb,adam8157/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,techdragon/Postgres-XL,oberstet/postgres-xl,lisakowen/gpdb,yazun/postgres-xl,techdragon/Postgres-XL,50wu/gpdb,jmcatamney/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,lisakowen/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,yazun/postgres-xl,xinzweb/gpdb,techdragon/Postgres-XL,50wu/gpdb,ashwinstar/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,zeroae/postgres-xl,techdragon/Postgres-XL,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,ovr/postgres-xl,zeroae/postgres-xl,pavanvd/postgres-xl,ashwinstar/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,50wu/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,ashwinstar/gpdb,50wu/gpdb,adam8157/gpdb,yazun/postgres-xl,pavanvd/postgres-xl,yazun/postgres-xl,ovr/postgres-xl,ashwinstar/gpdb,ovr/postgres-xl,jmcatamney/gpdb,oberstet/postgres-xl,pavanvd/postgres-xl,jmcatamney/gpdb,xinzweb/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,zeroae/postgres-xl,Postgres-XL/Postgres-XL,Postgres-XL/Postgres-XL,adam8157/gpdb,xinzweb/gpdb,xinzweb/gpdb,zeroae/postgres-xl,adam8157/gpdb,adam8157/gpdb,xinzweb/gpdb,ovr/postgres-xl,ashwinstar/gpdb,pavanvd/postgres-xl,50wu/gpdb,lisakowen/gpdb,yazun/postgres-xl,oberstet/postgres-xl,pavanvd/postgres-xl,greenplum-db/gpdb,oberstet/postgres-xl,xinzweb/gpdb