Re: Block-level CRC checks

From: Aidan Van Dyk <aidan(at)highrise(dot)ca>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Brian Hurt <bhurt(at)janestcapital(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2008-10-02 17:19:16
Message-ID: 20081002171916.GA16893@yugib.highrise.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Bruce Momjian <bruce(at)momjian(dot)us> [081002 13:07]:
> Jonah H. Harris wrote:
> > PG doesn't care because during hint-bits aren't logged and during
> > normal WAL replay, the old page will be pulled from the WAL. I
> > believe what Tom is referring to is that the buffer PG sends to
> > write() can still be modified by way of SetHintBits between the time
> > smgrwrite is called and the time the actual write takes place, which
> > is why we can't rely on a checksum of the buffer pointer passed to
> > smgrwrite and friends.
> >
> > If we're double-buffering the write, I don't see where we could be
> > introducing a torn-page, as we'd actually be writing a copied version
> > of the buffer. Will look into this.
>
> The torn page is during kernel write to disk, I assume, so it is still
> possible.

Ah, I see... So your full-page-write in the WAL, protecting the torn
page has to be aware of the need for a valid CRC32 as well...

--
Aidan Van Dyk Create like a god,
aidan(at)highrise(dot)ca command like a king,
http://www.highrise.ca/ work like a slave.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2008-10-02 17:31:02 Re: Block-level CRC checks
Previous Message Ron Mayer 2008-10-02 17:11:10 Re: Interval output bug in HAVE_INT64_TIMESTAMP