Re: mount -o async - is it safe?

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Doug McNaught <doug(at)mcnaught(dot)org>
Cc: Shane Wright <shane(dot)wright(at)edigitalresearch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: mount -o async - is it safe?
Date: 2006-01-19 15:15:18
Message-ID: 20060119151518.GF78403@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 19, 2006 at 09:34:00AM -0500, Doug McNaught wrote:
> Shane Wright <shane(dot)wright(at)edigitalresearch(dot)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(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2006-01-19 15:27:12 Re: No heap lookups on index
Previous Message Jim C. Nasby 2006-01-19 15:10:12 Re: [HACKERS] No heap lookups on index