Utilize the visibility map in autovacuum, too. There was an oversight in
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Utilize the visibility map in autovacuum, too. There was an oversight in the visibility map patch that because autovacuum always sets VacuumStmt->freeze_min_age, visibility map was never used for autovacuum, only for manually launched vacuums. This patch introduces a new scan_all field to VacuumStmt, indicating explicitly whether the visibility map should be used, or the whole relation should be scanned, to advance relfrozenxid. Anti-wraparound vacuums still need to scan all pages.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/vacuumlazy.c | modified | +2 −9 |
| src/backend/nodes/copyfuncs.c | modified | +2 −1 |
| src/backend/nodes/equalfuncs.c | modified | +2 −1 |
| src/backend/parser/gram.y | modified | +4 −1 |
| src/backend/postmaster/autovacuum.c | modified | +2 −1 |
| src/include/nodes/parsenodes.h | modified | +2 −1 |