Re: amcheck verification for GiST - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: amcheck verification for GiST
Date
Msg-id CAH2-WznzhHKREeXs1RMFYes+Ao7aam5dPSmvS2Hto6WUcjEk4A@mail.gmail.com
Whole thread Raw
In response to Re: amcheck verification for GiST  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: amcheck verification for GiST
List pgsql-hackers
On Fri, Sep 6, 2019 at 3:22 PM Peter Geoghegan <pg@bowt.ie> wrote:
> I'll take care of it, then.

Attached is v10, which has some comment and style fix-ups, including
the stuff Alvaro mentioned. It also adds line pointer sanitization to
match what I added to verify_nbtree.c in commit a9ce839a (we use a
custom PageGetItemIdCareful() for GiST instead of a simple
PageGetItemId()). I also added a new file/TU for the routines that are
now common to both nbtree and GiST verification, which I named
amcheck.c. (I'm not sure about that, but I don't like verify_nbtree.c
having generic/common functions.)

I have only had a few hours to polish this, which doesn't seem like
enough, though was enough to fix the noticeable stuff.

My main concern now is the heavyweight lock strength needed by the new
function. I don't feel particularly qualified to sign off on the
concurrency aspects of the patch. Heikki's v6 used a ShareLock, like
bt_index_parent_check(), but you went back to an AccessShareLock,
Andrey. Why is this safe? I see that you do gist_refind_parent() in
your v9 a little differently to Heikki in his v6, which you seemed to
suggest made this safe in your e-mail on March 28, but I don't
understand that at all.

-- 
Peter Geoghegan

Attachment

pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: add a MAC check for TRUNCATE
Next
From: Michael Paquier
Date:
Subject: Re: pg_regress restart cluster?