mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Count locked pages that don't need vacuuming as scanned.
Previously, if VACUUM skipped vacuuming a page because it's pinned, it didn't count that page as scanned. However, that meant that relfrozenxid was not bumped up either, which prevented anti-wraparound vacuum from doing its job. Report by Миша Тюрин, analysis and patch by Sergey Burladyn and Jeff Janes. Backpatch to 9.2, where the skip-locked-pages behavior was introduced.
This commit is contained in:
parent
f901bb50e3
commit
4c697d8f48
@ -602,6 +602,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
|
||||
if (!lazy_check_needs_freeze(buf))
|
||||
{
|
||||
UnlockReleaseBuffer(buf);
|
||||
vacrelstats->scanned_pages++;
|
||||
continue;
|
||||
}
|
||||
LockBuffer(buf, BUFFER_LOCK_UNLOCK);
|
||||
|
Loading…
x
Reference in New Issue
Block a user