Re: pgsql: Recursively fsync() the data directory after a crash. - Mailing list pgsql-committers

From Robert Haas
Subject Re: pgsql: Recursively fsync() the data directory after a crash.
Date
Msg-id CA+TgmobK=p4wnikYaSRgz6S3WhqDdFhpBv1Vmysz0cBQskoq=w@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Recursively fsync() the data directory after a crash.  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: pgsql: Recursively fsync() the data directory after a crash.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Sun, May 17, 2015 at 9:44 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On 5/4/15 2:23 PM, Robert Haas wrote:
>> Recursively fsync() the data directory after a crash.
>>
>> Otherwise, if there's another crash, some writes from after the first
>> crash might make it to disk while writes from before the crash fail
>> to make it to disk.  This could lead to data corruption.
>
> If there a reason why in pre_sync_fname(), the error message does not
> contain a %m?

For consistency with the rest of the file, I suppose.  Not sure why
it's like that, but all the functions in the file do it that way.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix typo in comment.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Translation updates