1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Include the first valid listen address in pg_ctl to improve server start

"wait" detection and add postmaster start time to help determine if the
postmaster is actually using the specified data directory.
This commit is contained in:
Bruce Momjian
2010-12-31 17:24:26 -05:00
parent 39c8dd6620
commit 30aeda4394
7 changed files with 121 additions and 62 deletions

View File

@ -198,9 +198,17 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size)
/* Register on-exit routine to detach new segment before deleting */
on_shmem_exit(IpcMemoryDetach, PointerGetDatum(memAddress));
/* Record key and ID in lockfile for data directory. */
RecordSharedMemoryInLockFile((unsigned long) memKey,
(unsigned long) shmid);
/*
* Append record key and ID in lockfile for data directory. Format
* to try to keep it the same length.
*/
{
char line[32];
sprintf(line, "%9lu %9lu\n", (unsigned long) memKey,
(unsigned long) shmid);
AddToLockFile(LOCK_FILE_LINES, line);
}
return memAddress;
}