diff options
author | Michael Paquier <michael@paquier.xyz> | 2019-05-09 10:29:29 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2019-05-09 10:29:29 +0900 |
commit | 25f12acd53f603a581d8bc89920037a811f12f82 (patch) | |
tree | 778fbe9e49e36dcbeb81cc311d638ea1e07d2991 | |
parent | a9d5383db2e17a602ab6f9f0b4955623a8d444a6 (diff) | |
download | postgresql-25f12acd53f603a581d8bc89920037a811f12f82.tar.gz postgresql-25f12acd53f603a581d8bc89920037a811f12f82.zip |
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
-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 bcea9e556dc..1034a1f3c48 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -524,7 +524,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; + } } } |