Re: Corrupted btree index on HEAD because of covering indexes - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Corrupted btree index on HEAD because of covering indexes
Date
Msg-id CAH2-Wzm7gVnDag-c8NOSC8ZtnWfTXXjGqXv7dvn=THXSN-V-8A@mail.gmail.com
Whole thread Raw
In response to Re: Corrupted btree index on HEAD because of covering indexes  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: Corrupted btree index on HEAD because of covering indexes
List pgsql-hackers
On Fri, Apr 20, 2018 at 7:18 AM, Teodor Sigaev <teodor@sigaev.ru> wrote:
> After close look I change my opinion. To have a clean code it's much better
> to have new pair get/set macroses specialy to manage link to top pare during
> page deletion. This removes last naked usage of
> ItemPointer(SetInvalid/IsInvalid/GetBlockNumberNoCheck) and uses
> self-described macroses. Patch is attached.

I see your point. Maybe don't have the newline between the get and
set, though, to match the existing style. And, the note about the
assertion seems unnecessary.

I suggest putting something about what general area this deals with.
Perhaps something like the following:

"Get/set leaf page highkey's link. During the second phase of
deletion, the target leaf page's high key may point to an ancestor
page (at all other times, the leaf level high key's link is not used).
See the nbtree README for full details."

-- 
Peter Geoghegan


pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Excessive PostmasterIsAlive calls slow down WAL redo
Next
From: Pavel Stehule
Date:
Subject: proposal: force slow part of plpgsql compilation