Skip site navigation (1) Skip section navigation (2)

Re: 16-bit page checksums for 9.2

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Ants Aasma <ants(dot)aasma(at)eesti(dot)ee>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, simon(at)2ndquadrant(dot)com, heikki(dot)linnakangas(at)enterprisedb(dot)com, aidan(at)highrise(dot)ca, stark(at)mit(dot)edu, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 16-bit page checksums for 9.2
Date: 2011-12-30 16:58:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 12/29/11, Ants Aasma <ants(dot)aasma(at)eesti(dot)ee> wrote:

> Unless I'm missing something, double-writes are needed for all writes,
> not only the first page after a checkpoint. Consider this sequence of
> events:
> 1. Checkpoint
> 2. Double-write of page A (DW buffer write, sync, heap write)
> 3. Sync of heap, releasing DW buffer for new writes.
>  ... some time goes by
> 4. Regular write of page A
> 5. OS writes one part of page A
> 6. Crash!
> Now recovery comes along, page A is broken in the heap with no
> double-write buffer backup nor anything to recover it by in the WAL.

Isn't 3 the very definition of a checkpoint, meaning that 4 is not
really a regular write as it is the first one after a checkpoint?

But it doesn't seem safe to me replace a page from the DW buffer and
then apply WAL to that replaced page which preceded the age of the
page in the buffer.



In response to


pgsql-hackers by date

Next:From: Merlin MoncureDate: 2011-12-30 19:46:24
Subject: Re: Progress on fast path sorting, btree index creation time
Previous:From: Andrew DunstanDate: 2011-12-30 16:43:05
Subject: Re: spinlocks on powerpc

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group