hashbulkdelete()'s outer per-bucket loop has no interrupt check, so a pending shutdown/cancel isn't honored until the whole index scan finishes. Adds a vacuum_delay_point() call before any lock is taken, so it's noticed at the next bucket boundary instead. Verified manually: ~2.08s to ~0.014s cancel latency. Does not address the single-bucket-long-overflow-chain case.

Edit
ID 7216
Title hashbulkdelete()'s outer per-bucket loop has no interrupt check, so a pending shutdown/cancel isn't honored until the whole index scan finishes. Adds a vacuum_delay_point() call before any lock is taken, so it's noticed at the next bucket boundary instead. Verified manually: ~2.08s to ~0.014s cancel latency. Does not address the single-bucket-long-overflow-chain case.
CI (CFBot) Summary
Stats (from CFBot) Patch count: 1, First patch: +6−0, All patches: +6−0
Tags Bugfix
Created 2026-08-29 14:49:36
Last modified 2026-08-29 14:49:36 (47 minutes ago)
Latest email 2026-08-22 14:54:19 (1 week ago)
Status
PG20-2 (2026-09-01 – 2026-09-30): Needs review
Target version stable
Authors mostafa nabil (mostafan)
Reviewers Become reviewer
Committer
Links
Emails
BUG #19628: Uninterruptible vacuum during hash index processing
First at 2026-08-18 12:02:07 by PG Bug reporting form <noreply at postgresql.org>
Latest at 2026-08-22 14:54:19 by mostafa nabil <mostafa.nabil.nafie at gmail.com>
Latest attachment (0001-Check-for-interrupts-between-hash-index-vacuum-bucke.patch) at 2026-08-22 14:54:19 from mostafa nabil <mostafa.nabil.nafie at gmail.com>
    Attachment (0001-Check-for-interrupts-between-hash-index-vacuum-bucke.patch) at 2026-08-22 14:54:19 from mostafa nabil <mostafa.nabil.nafie at gmail.com> (Patch: No)
History
When Who What
2026-08-29 14:49:36 mostafa nabil (mostafan) Attached mail thread 19628-c2b17d358181a1ea@postgresql.org
2026-08-29 14:49:36 mostafa nabil (mostafan) Created patch record
Edit