Understanding fsync (was: Need Help Recovering from Botched Upgrade Attempt) - Mailing list pgsql-general

From Sam Mason
Subject Understanding fsync (was: Need Help Recovering from Botched Upgrade Attempt)
Date
Msg-id 20080618154336.GG2572@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to Re: Need Help Recovering from Botched Upgrade Attempt  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: Understanding fsync (was: Need Help Recovering from Botched Upgrade Attempt)  (Greg Smith <gsmith@gregsmith.com>)
List 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

pgsql-general by date:

Previous
From: Garry Saddington
Date:
Subject: Re: UTF8 encoding problem
Next
From: Rich Shepard
Date:
Subject: Re: Need Help Recovering from Botched Upgrade Attempt