summaryrefslogtreecommitdiff
path: root/src/backend/port/sysv_shmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/port/sysv_shmem.c')
-rw-r--r--src/backend/port/sysv_shmem.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c
index d970eb29967..ff770998851 100644
--- a/src/backend/port/sysv_shmem.c
+++ b/src/backend/port/sysv_shmem.c
@@ -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;
}