]> granicus.if.org Git - postgresql/commit
Check for interrupts inside the nbtree page deletion code.
authorAndres Freund <andres@anarazel.de>
Wed, 4 Jul 2018 21:53:30 +0000 (14:53 -0700)
committerAndres Freund <andres@anarazel.de>
Wed, 4 Jul 2018 22:08:32 +0000 (15:08 -0700)
commit0c69db762d886ce2c2b0cb311e24ab76c4740c0b
tree42e7f1f7534bd52cdc997fefaf7fca9bbe0edd9b
parent9e53171b1057ddb50063a58651aff45f8fc339d7
Check for interrupts inside the nbtree page deletion code.

When deleting pages the nbtree code has to walk through siblings of a
tree node. When those sibling links are corrupted that can lead to
endless loops - which are currently not interruptible.  This is
especially problematic if autovacuum is repeatedly blocked on such
indexes, as it can be hard to get out of that situation without
resorting to single user mode.

Thus add interrupt checks to appropriate places in such
loops. Unfortunately in one of the cases it's it's not easy to do so.

Between 9.3 and 9.4 the page deletion (and page split) code changed
significantly. Before it was significantly less robust against
interruptions. Therefore don't backpatch to 9.3.

Author: Andres Freund
Discussion: https://postgr.es/m/20180627191629.wkunw2qbibnvlz53@alap3.anarazel.de
Backpatch: 9.4-
src/backend/access/nbtree/nbtpage.c