Re: BUG #17245: Index corruption involving deduplicated entries - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: BUG #17245: Index corruption involving deduplicated entries
Date
Msg-id CAH2-Wz=vhvBx1GjF+oueHh8YQcHoQYrMi0F0zFMHEr8yc4sCoA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17245: Index corruption involving deduplicated entries  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: BUG #17245: Index corruption involving deduplicated entries
Re: BUG #17245: Index corruption involving deduplicated entries
List pgsql-bugs
On Sun, Oct 31, 2021 at 5:19 PM Peter Geoghegan <pg@bowt.ie> wrote:
> The only way it could be okay for an LP_REDIRECT item to point to an
> LP_DEAD item would be if you knew for sure that the LP_REDIRECT item
> would actually become LP_DEAD at the same time as the LP_DEAD item (so
> both get removed from indexes) -- which is a contradiction in terms.
> Why wouldn't pruning just mark the LP_REDIRECT item LP_DEAD instead,
> while making the would-be LP_DEAD item skip straight to being an
> LP_UNUSED item? That approach is strictly better.

Attached patch adds assertions and comments to
heap_page_prune_execute() that document my understanding of things.
This passes "make check-world" for me.

How do you feel about doing something like this too?

-- 
Peter Geoghegan

Attachment

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17260: Unable to Download Installer: Receiving Internal Server Error 500
Next
From: Semab Tariq
Date:
Subject: Re: BUG #17260: Unable to Download Installer: Receiving Internal Server Error 500