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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user