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

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Arrange to fsync the contents of lockfiles (both postmaster.pid
Date: 2010-08-16 17:32:46
Message-ID: 20100816173246.D23997541D7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/backend/utils/init:
miscinit.c (r1.184 -> r1.185)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/miscinit.c?r1=1.184&r2=1.185)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-08-16 17:32:54 pgsql: Arrange to fsync the contents of lockfiles (both postmaster.pid
Previous Message Greg Smith 2010-08-16 07:28:47 Re: Re: [COMMITTERS] pgsql: Recognize functional dependency on primary keys.