Re: Avoiding another needless ERROR during nbtree page deletion
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-05-22T17:59:59Z
Lists: pgsql-hackers
Attachments
- v2-0001-nbtree-VACUUM-cope-with-right-sibling-link-corrup.patch (application/octet-stream) patch v2-0001
On Mon, May 22, 2023 at 9:22 AM Peter Geoghegan <pg@bowt.ie> wrote: > > This comment notes that this is similar to what we did with the left > > sibling, but there isn't really any mention at the left sibling code > > about avoiding hard ERRORs. Feels a bit backwards. Maybe move the > > comment about avoiding the hard ERROR to where the left sibling is > > handled. Or explain it in the function comment and just have short > > "shouldn't happen, but avoid hard ERROR if the index is corrupt" comment > > here. > > Good point. Will do it that way. Attached is v2, which does it that way. It also adjusts the approach taken to release locks and pins when the left sibling validation check fails. This makes it simpler and more consistent with surrounding code. I might not include this change in the backpatch. Not including a revised amcheck patch here, since I'm not exactly sure what to do with your feedback on that one just yet. -- Peter Geoghegan
Commits
-
nbtree VACUUM: cope with right sibling link corruption.
- 5abff197cc3e 16.0 landed
- 6983a511288c 15.4 landed
- 322c9b340ada 14.9 landed
- 8f876d15ca93 13.12 landed
- 188dad680e8f 12.16 landed
- a72b503ca828 11.21 landed
-
Backpatch nbtree page deletion hardening.
- 43e409cea468 13.9 cited
-
nbtree VACUUM: Cope with buggy opclasses.
- 5b861baa550a 14.0 cited