Re: silent data loss with ext4 / all current versions - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: silent data loss with ext4 / all current versions
Date
Msg-id 565B0F10.4000609@2ndquadrant.com
Whole thread Raw
In response to Re: silent data loss with ext4 / all current versions  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers

On 11/29/2015 02:41 PM, Craig Ringer wrote:
> On 27 November 2015 at 19:17, Tomas Vondra <tomas.vondra@2ndquadrant.com
> <mailto:tomas.vondra@2ndquadrant.com>> wrote:
>
>     It's also possible to mitigate this by setting wal_sync_method=fsync
>
>
> Are you sure?
>
> https://lwn.net/Articles/322823/ tends to suggest that fsync() on the
> file is insufficient to ensure rename() is persistent, though it's
> somewhat old.

Good point. I don't know, and I'm not any smarter after reading the LWN 
article. What I meant by "mitigate" is that I've been unable to 
reproduce the issue after setting wal_sync_method=fsync, so my 
conclusion is that it either fixes the issue or at least significantly 
reduces the probability of hitting it.

It's pretty clear that the right fix is the additional fsync on pg_xlog.

regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: silent data loss with ext4 / all current versions
Next
From: Emre Hasegeli
Date:
Subject: Segfault while using an array domain