Re: Online verification of checksums - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: Online verification of checksums
Date
Msg-id 75ad93fd-faf9-571b-fbc6-befdebf9fd80@2ndquadrant.com
Whole thread Raw
In response to Re: Online verification of checksums  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Online verification of checksums
Re: Online verification of checksums
List pgsql-hackers
On 3/2/19 12:03 AM, Robert Haas wrote:
> On Tue, Sep 18, 2018 at 10:37 AM Michael Banck
> <michael.banck@credativ.de> wrote:
>> I have added a retry for this as well now, without a pg_sleep() as well.
>> This catches around 80% of the half-reads, but a few slip through. At
>> that point we bail out with exit(1), and the user can try again, which I
>> think is fine?
> 
> Maybe I'm confused here, but catching 80% of torn pages doesn't sound
> robust at all.
> 

FWIW I don't think this qualifies as torn page - i.e. it's not a full
read with a mix of old and new data. This is partial write, most likely
because we read the blocks one by one, and when we hit the last page
while the table is being extended, we may only see the fist 4kB. And if
we retry very fast, we may still see only the first 4kB.


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: James Coleman
Date:
Subject: Re: Proving IS NOT NULL inference for ScalarArrayOpExpr's
Next
From: Tomas Vondra
Date:
Subject: Re: Online verification of checksums