Re: Patch for fail-back without fresh backup - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Patch for fail-back without fresh backup
Date
Msg-id 51BB17E5.3060509@vmware.com
Whole thread Raw
In response to Re: Patch for fail-back without fresh backup  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Patch for fail-back without fresh backup
List pgsql-hackers
On 14.06.2013 16:08, Tom Lane wrote:
> Heikki Linnakangas<hlinnakangas@vmware.com>  writes:
>> Well, time will tell I guess. The biggest overhead with the checksums is
>> exactly the WAL-logging of hint bits.
>
> Refresh my memory as to why we need to WAL-log hints for checksumming?

Torn pages:

1. Backend sets a hint bit, dirtying the buffer.
2. Checksum is calculated, and buffer is written out to disk.
3. <crash>

If the page is torn, the checksum won't match. Without checksums, a torn 
page is not a problem with hint bits, as a single bit can't be torn and 
the page is otherwise intact. But with checksums, it causes a checksum 
failure.

- Heikki



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Patch for fail-back without fresh backup
Next
From: Tom Lane
Date:
Subject: Re: Patch for fail-back without fresh backup