]> 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:32:46 +0000 (17:32 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 16 Aug 2010 17:32:46 +0000 (17:32 +0000)
commitee0e525bfc3a3d0851e36d3d15dce3a8bd7ac029
treefffcafd152bae947f6ca003ae9fb8cd9bb86612a
parent66b14030e889f09b49b3be9b93d63a00289d73c7
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