Re: Can we trust fsync?

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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 16:04:16
Message-ID: CAM-w4HODzQ_DKUtGGCfjoh=WnrNLXj=iJpQV4rE78pcRpA5c5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

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. You would have to test doing table extensions or pulling the
plug immediately after switching xlog files repeatedly to have any coverage
at all there.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-11-22 16:16:06 Re: Can we trust fsync?
Previous Message Michael Meskes 2013-11-22 15:43:08 Building on S390