aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2021-11-02 19:52:10 -0700
committerPeter Geoghegan <pg@bowt.ie>2021-11-02 19:52:10 -0700
commitf6162c020c880189255e77e33bde74a2b951eaae (patch)
treed2f6bef8c2b493f4f4a6b538c21eca5fda96fca1
parent61a86ed55ba169044b9a692542bad1b05341147b (diff)
downloadpostgresql-f6162c020c880189255e77e33bde74a2b951eaae.tar.gz
postgresql-f6162c020c880189255e77e33bde74a2b951eaae.zip
Fix parallel amvacuumcleanup safety bug.
Commit b4af70cb inverted the return value of the function parallel_processing_is_safe(), but missed the amvacuumcleanup test. Index AMs that don't support parallel cleanup at all were affected. The practical consequences of this bug were not very serious. Hash indexes are affected, but since they just return the number of blocks during hashvacuumcleanup anyway, it can't have had much impact. Author: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CAD21AoA-Em+aeVPmBbL_s1V-ghsJQSxYL-i3JP8nTfPiD1wjKw@mail.gmail.com Backpatch: 14-, where commit b4af70cb appears.
-rw-r--r--src/backend/access/heap/vacuumlazy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 13264007261..24fa72983c1 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -4120,7 +4120,7 @@ parallel_processing_is_safe(Relation indrel, LVShared *lvshared)
/* Skip, if the index does not support parallel cleanup */
if (((vacoptions & VACUUM_OPTION_PARALLEL_CLEANUP) == 0) &&
((vacoptions & VACUUM_OPTION_PARALLEL_COND_CLEANUP) == 0))
- return true;
+ return false;
/*
* Skip, if the index supports parallel cleanup conditionally, but we