Re: PANIC in heap_delete during ALTER TABLE
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Robins Tharakan <tharakan@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Date: 2022-09-07T22:44:41Z
Lists: pgsql-bugs
On Wed, Sep 7, 2022 at 2:53 PM Jeff Davis <pgsql@j-davis.com> wrote: > Yes, it looks like it's essentially the same issue. > > heap_delete() does recheck after locking the buffer correctly at the > top, but there are other paths below which unlock/relock the buffer > without checking to see if the VM pin should be acquired. This certainly vindicates Tom's decision to backpatch his fix for the heap_update() issue. Clearly this new variant bug can't have anything to do with the 14-era behavioral change to lazy_vacuum_heap_page() from commit 8523492d4e. That behavioral change was clearly a factor in the heap_update() issue, but can't be relevant here. Since the repro we have shows that 13 is also affected. I wonder why it took this long to hear anything about it, though. Maybe it just worked out that way because the earlier (or was it later?) heap_update() issue created a public record that somebody like Robins could find. -- Peter Geoghegan
Commits
-
Fix race condition where heap_delete() fails to pin VM page.
- cab72f0fd08c 12.13 landed
- 410c422b75ac 13.9 landed
- 21934612d86a 14.6 landed
- dd6070bc8173 15.0 landed
- 163b0993a162 16.0 landed
-
Avoid improbable PANIC during heap_update.
- 5f12bc94dcc6 12.7 cited
-
Remove tupgone special case from vacuumlazy.c.
- 8523492d4e34 14.0 cited