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

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

Commit: e521b3e9b54f118daa44c56af95894b1cefda517
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-08-16T17:33:17Z
Releases: 8.1.22
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 +24 −3