Re: Migration study, step 1: bulk write performance

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>, Mikael Carneholm <Mikael(dot)Carneholm(at)WirelessCar(dot)com>, postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Migration study, step 1: bulk write performance
Date: 2006-03-21 12:18:39
Message-ID: 20060321121839.GT15742@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Mar 21, 2006 at 01:10:32PM +0100, Steinar H. Gunderson wrote:
> On Tue, Mar 21, 2006 at 06:01:58AM -0600, Jim C. Nasby wrote:
> > Are you sure? Metadate changes are probably a lot more common on the WAL
> > partition. In any case, I don't see why there should be a difference.
> > The real issue is: is related filesystem metadata sync'd as part of a
> > file being fsync'd?
>
> I've been told on this list that PostgreSQL actually takes care to fill a new
> WAL file with zeroes etc. when initializing it; dig a few months back and I'm
> sure it's there.

That's fine and all, but does no good if the filesystem doesn't know
that the file exists on a crash. The same concern is also true on the
data partition, although it's less likely to be a problem because if you
happen to crash soon after a DDL operation it's likely that you haven't
had a checkpoint yet, so the operation will likely be repeated during
WAL replay. But depending on that is a race condition.

Basically, you need to know for certain that if PostgreSQL creates a
file and then fsync's it that that file is safely on disk, and that the
filesystem knows how to find it (ie: the metadata is also on disk in
some fashion).
--
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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jim C. Nasby 2006-03-21 12:22:11 WAL logging of SELECT ... INTO command
Previous Message Steinar H. Gunderson 2006-03-21 12:10:32 Re: Migration study, step 1: bulk write performance