diff options
Diffstat (limited to 'src/backend/port')
-rw-r--r-- | src/backend/port/ipc_test.c | 4 | ||||
-rw-r--r-- | src/backend/port/sysv_shmem.c | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/port/ipc_test.c b/src/backend/port/ipc_test.c index 2518007c4b6..b4bcf40a7ab 100644 --- a/src/backend/port/ipc_test.c +++ b/src/backend/port/ipc_test.c @@ -104,7 +104,7 @@ on_exit_reset(void) } void -AddToLockFile(int target_line, const char *str) +AddToDataDirLockFile(int target_line, const char *str) { } @@ -135,7 +135,7 @@ errcode_for_file_access(void) bool errstart(int elevel, const char *filename, int lineno, - const char *funcname) + const char *funcname, const char *domain) { return (elevel >= ERROR); } diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index 474c6142ebe..aece026ec64 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -199,15 +199,16 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size) on_shmem_exit(IpcMemoryDetach, PointerGetDatum(memAddress)); /* - * Append record key and ID in lockfile for data directory. Format - * to try to keep it the same length. + * Store shmem key and ID in data directory lockfile. Format to try to + * keep it the same length always (trailing junk in the lockfile won't + * hurt, but might confuse humans). */ { - char line[32]; + char line[64]; - sprintf(line, "%9lu %9lu\n", (unsigned long) memKey, - (unsigned long) shmid); - AddToLockFile(LOCK_FILE_LINES, line); + sprintf(line, "%9lu %9lu", + (unsigned long) memKey, (unsigned long) shmid); + AddToDataDirLockFile(LOCK_FILE_LINE_SHMEM_KEY, line); } return memAddress; |