Re: Can we trust fsync?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <stark(at)mit(dot)edu>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Can we trust fsync?
Date: 2013-11-22 22:57:15
Message-ID: 20131122225715.GE32176@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 22, 2013 at 11:16:06AM -0500, Tom Lane wrote:
> Greg Stark <stark(at)mit(dot)edu> writes:
> > On Thu, Nov 21, 2013 at 1:43 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Also, it's not that hard to do plug-pull testing to verify that your
> >> system is telling the truth about fsync. This really ought to be part
> >> of acceptance testing for any new DB server.
>
> > I've never tried it but I always wondered how easy it was to do. How would
> > you ever know you had tested it enough?
>
> I used the program Greg Smith recommends on our wiki (can't remember the
> name offhand) when I got a new house server this spring. With the RAID
> card configured for writethrough and no battery, it failed all over the
> place. Fixed those configuration bugs, it was okay three or four times
> in a row, which was good enough for me.
>
> > The original mail was referencing a problem with syncing *meta* data
> > though. The semantics around meta data syncs are much less clearly
> > specified, in part because file systems traditionally made nearly all meta
> > data operations synchronous. Doing plug-pull testing on Postgres would not
> > test meta data syncing very well since Postgres specifically avoids doing
> > much meta data operations by overwriting existing files and blocks as much
> > as possible.
>
> True. You're better off with a specialized testing program. (Though
> now you mention it, I wonder whether that program was stressing metadata
> or not.)

The program is diskchecker:

http://brad.livejournal.com/2116715.html

I got the author to re-host the source code on github a few years ago.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2013-11-22 23:06:31 Re: Can we trust fsync?
Previous Message Bruce Momjian 2013-11-22 22:46:15 Re: Patch for fail-back without fresh backup