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

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Recursively fsync() the data directory after a crash.
Date: 2015-05-05 03:37:21
Message-ID: 55483AF1.50208@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers


On 05/04/2015 02: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.
>
> Back-patch to all supported versions.
>

This appears to have broken Windows builds. At least it's broken by
using the two argument form of open instead of the three argument form,
for which we have a #define in the win32 case, and pg_win32_is_junction
is a typo - the first _ should not be there.

cheers

andrew

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-05-05 13:17:07 Re: pgsql: Recursively fsync() the data directory after a crash.
Previous Message Peter Eisentraut 2015-05-05 02:31:10 pgsql: hstore_plpython: Support tests on Python 2.3