Commit 97a75ed
Add vacuum_delay_point() to GiST empty-page deletion pass
gistvacuum_delete_empty_pages() rescans the index's internal pages to
unlink the empty leaf pages found during the main vacuum scan. For each
internal page it reads a buffer and may perform WAL-logged page
deletions, but the loop never calls vacuum_delay_point(). This phase of
a GiST vacuum therefore ignores the cost-based vacuum delay, unlike the
other page-scanning loops in this file: gistvacuumscan() calls
vacuum_delay_point() at the top of its per-page loop, and gistvacuumpage()
calls it before re-reading a buffer when it recurses to an earlier page.
Add vacuum_delay_point(false) at the top of the loop, where no buffer
lock is held, matching the sibling idiom. vacuum_delay_point() also
checks for interrupts, so this additionally lets the pass respond to
query cancellation without having to wait for a buffer read to perform
I/O.
gistvacuum_delete_empty_pages() has lacked this since it was introduced
in commit 7df159a.1 parent 44056f6 commit 97a75ed
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
527 | 530 | | |
528 | 531 | | |
529 | 532 | | |
| |||
0 commit comments