mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-10 07:07:30 +08:00
autovacuum: Fix polarity of "wraparound" variable
Commit 0d831389749a3 inadvertently reversed the meaning of the wraparound variable. This causes vacuums which are not required for wraparound to wait for locks to be acquired, and what is worse, it allows wraparound vacuums to skip locked pages. Bug reported by Jeff Janes in http://www.postgresql.org/message-id/CAMkU=1xmTEiaY=5oMHsSQo5vd9V1Ze4kNLL0qN2eH0P_GXOaYw@mail.gmail.com Analysis and patch by Kyotaro HORIGUCHI
This commit is contained in:
@ -2526,7 +2526,7 @@ table_recheck_autovac(Oid relid, HTAB *table_toast_map,
|
||||
tab->at_vacoptions = VACOPT_SKIPTOAST |
|
||||
(dovacuum ? VACOPT_VACUUM : 0) |
|
||||
(doanalyze ? VACOPT_ANALYZE : 0) |
|
||||
(wraparound ? VACOPT_NOWAIT : 0);
|
||||
(!wraparound ? VACOPT_NOWAIT : 0);
|
||||
tab->at_params.freeze_min_age = freeze_min_age;
|
||||
tab->at_params.freeze_table_age = freeze_table_age;
|
||||
tab->at_params.multixact_freeze_min_age = multixact_freeze_min_age;
|
||||
|
||||
Reference in New Issue
Block a user