Commit 5a907404 authored by Noah Misch's avatar Noah Misch

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 (39627b1a) 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
parent bfbcad47
...@@ -1066,14 +1066,10 @@ CreateLockFile(const char *filename, bool amPostmaster, ...@@ -1066,14 +1066,10 @@ CreateLockFile(const char *filename, bool amPostmaster,
if (PGSharedMemoryIsInUse(id1, id2)) if (PGSharedMemoryIsInUse(id1, id2))
ereport(FATAL, ereport(FATAL,
(errcode(ERRCODE_LOCK_FILE_EXISTS), (errcode(ERRCODE_LOCK_FILE_EXISTS),
errmsg("pre-existing shared memory block " errmsg("pre-existing shared memory block (key %lu, ID %lu) is still in use",
"(key %lu, ID %lu) is still in use",
id1, id2), id1, id2),
errhint("If you're sure there are no old " errhint("Terminate any old server processes associated with data directory \"%s\".",
"server processes still running, remove " refName)));
"the shared memory block "
"or just delete the file \"%s\".",
filename)));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment