Re: pgsql: Recursively fsync() the data directory after a crash.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Recursively fsync() the data directory after a crash.
Date: 2015-05-18 12:01:52
Message-ID: CA+TgmobK=p4wnikYaSRgz6S3WhqDdFhpBv1Vmysz0cBQskoq=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Sun, May 17, 2015 at 9:44 PM, Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2015-05-18 12:59:12 pgsql: Translation updates
Previous Message Heikki Linnakangas 2015-05-18 07:39:25 pgsql: Fix typo in comment.