On Mon, Aug 17, 2026 at 2:15 PM Peter Geoghegan <[email protected]> wrote: > Go ahead and post fixes.
I attach my own fixes for both bugs. I couldn't resist the temptation to clean up some ginInsertCleanup related comments in v1-0002-*. I've always found the distinction between forceCleanup and full_clean confusing. I propose renaming full_clean to must_empty_list (plus my comment fix ups) to make all this less confusing. 2016 bug fix commit e2c79e14 seems related to my v1-0002-* patch: "Previously, ginInsertCleanup could exit early if it detects that someone else is cleaning up the pending list, without waiting for that someone else to finish the job. But in this case vacuum could miss tuples to be deleted." But it missed that the existing call to ginInsertCleanup still only happened on the first call to ginbulkdelete, which isn't necessarily the only one. So I think that it makes sense to think of my v1-0002-* as fixing an oversight in that 2016 commit. It's certainly a very similar bug: both bugs involve ginInsertCleanup failing to force TIDs into the main entry tree, making ginbulkdelete fail to reliably remove all of the TIDs that VACUUM needs it to remove from the index. -- Peter Geoghegan
v1-0002-Clean-up-the-GIN-pending-list-on-every-ginbulkdel.patch
Description: Binary data
v1-0001-Re-check-GinPageIsLeaf-after-relocking-a-GIN-post.patch
Description: Binary data
