Skip to content

Commit 00ee6c7

Browse files
committed
autovacuum: Fix polarity of "wraparound" variable
Commit 0d83138 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
1 parent c02ef23 commit 00ee6c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/postmaster/autovacuum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2526,7 +2526,7 @@ table_recheck_autovac(Oid relid, HTAB *table_toast_map,
25262526
tab->at_vacoptions = VACOPT_SKIPTOAST |
25272527
(dovacuum ? VACOPT_VACUUM : 0) |
25282528
(doanalyze ? VACOPT_ANALYZE : 0) |
2529-
(wraparound ? VACOPT_NOWAIT : 0);
2529+
(!wraparound ? VACOPT_NOWAIT : 0);
25302530
tab->at_params.freeze_min_age = freeze_min_age;
25312531
tab->at_params.freeze_table_age = freeze_table_age;
25322532
tab->at_params.multixact_freeze_min_age = multixact_freeze_min_age;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy