Arrange to fsync the contents of lockfiles (both postmaster.pid and the

Tom Lane <tgl@sss.pgh.pa.us>

Commit: e8b4a23b12f99fb15f2aabd1d6b649d5bdf9fb83
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-08-16T17:33:22Z
Releases: 8.0.26
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.

Files

PathChange+/−
src/backend/utils/init/miscinit.c modified +19 −1