Re: mount -o async - is it safe? - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: mount -o async - is it safe?
Date
Msg-id 20060119151518.GF78403@pervasive.com
Whole thread Raw
In response to Re: mount -o async - is it safe?  (Doug McNaught <doug@mcnaught.org>)
List pgsql-general
On Thu, Jan 19, 2006 at 09:34:00AM -0500, Doug McNaught wrote:
> Shane Wright <shane.wright@edigitalresearch.com> writes:
>
> > Actually I thought that *all* the database had to have fsync() work correctly;
> > not for integrity on failed transactions, but to maintain integrity during
> > checkpointing as well.  But I could well be wrong!

You're correct; if the OS or drives lie about fsync'ing the base tables
during a checkpoint you can end up with a corrupted database. The only
'upside' here is that checkpoints don't happen as often, so the risk is
slightly less, but it's still there.

And all the debate about filesystem options is pointless unless they
have also turned off any unsafe write caching by the drives.

> I dimly recall this sort of thing being discussed in the past, but I
> don't know offhand whether PG does its WAL writes in small chunks or
> page-at-a-time.

It's done in pages, but remember that every commit requires an fsync of
WAL.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: [HACKERS] No heap lookups on index
Next
From: Axel Straschil
Date:
Subject: PostgreSQL - a ORDBMS?