diff options
author | Michael Paquier <michael@paquier.xyz> | 2019-05-09 10:29:52 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2019-05-09 10:29:52 +0900 |
commit | a9a886c6fd9b446866af8d95bc997f6e88496aaa (patch) | |
tree | 726906e23b4c3247844cfd9b490d81b1668660bb /src | |
parent | 44b973b71c9566b946bd2a3dd1570d4fed1547a8 (diff) |
Fix error status of vacuumdb when multiple jobs are used
When running a batch of VACUUM or ANALYZE commands on a given database,
there were cases where it is possible to have vacuumdb not report an
error where it actually should, leading to incorrect status results.
Author: Julien Rouhaud
Reviewed-by: Amit Kapila, Michael Paquier
Discussion: https://postgr.es/m/CAOBaU_ZuTwz7CtqLYJ1Ouuh272bTQPLN8b1bAPk0bCBm4PDMTQ@mail.gmail.com
Backpatch-through: 9.5
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/scripts/vacuumdb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c index 20dd1d2e601..93728a3a969 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -519,7 +519,10 @@ vacuum_one_database(const char *dbname, vacuumingOptions *vacopts, for (j = 0; j < concurrentCons; j++) { if (!GetQueryResult((slots + j)->connection, progname)) + { + failed = true; goto finish; + } } } |