Understanding fsync (was: Need Help Recovering from Botched Upgrade Attempt)

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Understanding fsync (was: Need Help Recovering from Botched Upgrade Attempt)
Date: 2008-06-18 15:43:36
Message-ID: 20080618154336.GG2572@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 18, 2008 at 11:24:16PM +0800, Craig Ringer wrote:
> Alan Hodgson wrote:
> >You can't just backup a live database from the filesystem level and expect
> >it to work ...
>
> It should be OK, if less than ideal, if:
>
> - You have fsync enabled (which you do if you care about your data);

I've always wondered about this! Isn't fsync only a side-effect of
having a write-back cache between programs and the disk? This means
it's only purpose is to ensure that the cache is consistent with what's
on disk. Because all programs running within a system are running on
top of the cache they don't know or care whether the cache actually
matches up to the disk.

Therefore, if I understand things correctly, the state of fsync
shouldn't matter in this use case. It's equally borken independent to
the state of fsync.

Sam

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2008-06-18 15:48:41 Re: Need Help Recovering from Botched Upgrade Attempt
Previous Message Craig Ringer 2008-06-18 15:24:16 Re: Need Help Recovering from Botched Upgrade Attempt