]> granicus.if.org Git - postgresql/commit
Arrange to fsync the contents of lockfiles (both postmaster.pid and the
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 16 Aug 2010 17:33:07 +0000 (17:33 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 16 Aug 2010 17:33:07 +0000 (17:33 +0000)
commit1eece5da38c3fd5e6cf9ba315d93f928e2db73be
tree85188d0f0f9c00b3fda4ce036e19776c846fd654
parent61f781854c6a64a0ac00a543387adec3839402e4
Arrange to fsync the contents of lockfiles (both postmaster.pid and the
socket lockfile) when writing them.  The lack of an fsync here may well
explain two different reports we've seen of corrupted lockfile contents,
which doesn't particularly bother the running server but can prevent a
new server from starting if the old one crashes.  Per suggestion from
Alvaro.

Back-patch to all supported versions.
src/backend/utils/init/miscinit.c