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-Wzmn8XqP8pcEDUYh2b7QMp7pL1H8D1vQQ-0TNV_zwuENvA@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
List pgsql-bugs
On Sun, Oct 31, 2021 at 7:21 PM Peter Geoghegan <pg@bowt.ie> wrote:
> Attached patch adds assertions and comments to
> heap_page_prune_execute() that document my understanding of things.
> This passes "make check-world" for me.

Attached is a more worked out fix for the bug. It includes a test case
that will lead to an assertion failure in nbtdedup.c (when the fix
itself is absent). The test is loosely based on one from Masahiko's
patch on the dedicated parallel VACUUM thread.

The testing here isn't quite as extensive as we talked about, but only
because it's hard to do that within the confines of the current
design, per my remarks earlier on the other thread. It's not like we
have long to go before 14.1, and so I'd like to commit something like
this in the next couple of days.

I've also combined my heap pruning assertion patch (from the other
thread) with the heap_index_delete_tuples() assertions we talked about
on this thread -- they're very similar, and so might as well just be
handled as a single commit. I can delay committing this second patch
until I hear back about the details. Note that there still aren't any
new defensive ERRORs here, for now.

-- 
Peter Geoghegan

Attachment

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #17261: FK ON UPDATE CASCADE can break referential integrity with columns of different types
Next
From: Tom Lane
Date:
Subject: Re: BUG #17261: FK ON UPDATE CASCADE can break referential integrity with columns of different types