Skip to content

Commit f3461cb

Browse files
committed
Update HINT for pre-existing shared memory block.
One should almost always terminate an old process, not use a manual removal tool like ipcrm. Removal of the ipcclean script eleven years ago (39627b1) and its non-replacement corroborate that manual shm removal is now a niche goal. Back-patch to 9.4 (all supported versions). Reviewed by Daniel Gustafsson and Kyotaro HORIGUCHI. Discussion: https://postgr.es/m/20180812064815.GB2301738@rfd.leadboat.com
1 parent 31737eb commit f3461cb

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/backend/utils/init/miscinit.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -795,14 +795,10 @@ CreateLockFile(const char *filename, bool amPostmaster,
795795
if (PGSharedMemoryIsInUse(id1, id2))
796796
ereport(FATAL,
797797
(errcode(ERRCODE_LOCK_FILE_EXISTS),
798-
errmsg("pre-existing shared memory block "
799-
"(key %lu, ID %lu) is still in use",
798+
errmsg("pre-existing shared memory block (key %lu, ID %lu) is still in use",
800799
id1, id2),
801-
errhint("If you're sure there are no old "
802-
"server processes still running, remove "
803-
"the shared memory block "
804-
"or just delete the file \"%s\".",
805-
filename)));
800+
errhint("Terminate any old server processes associated with data directory \"%s\".",
801+
refName)));
806802
}
807803
}
808804

0 commit comments

Comments
 (0)