aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-05-09 10:29:10 +0900
committerMichael Paquier <michael@paquier.xyz>2019-05-09 10:29:10 +0900
commit3ae3c18b362817f9412c380539f1a16c7abb79c9 (patch)
tree849c9f11346e8b650ec7bc5d1f70c81fd4f307e4 /src
parentd95e36dc384e3068ae2db909c228b1800737b18d (diff)
downloadpostgresql-3ae3c18b362817f9412c380539f1a16c7abb79c9.tar.gz
postgresql-3ae3c18b362817f9412c380539f1a16c7abb79c9.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
Diffstat (limited to 'src')
-rw-r--r--src/bin/scripts/vacuumdb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c
index f15e1ad8f1c..e9da74c3bae 100644
--- a/src/bin/scripts/vacuumdb.c
+++ b/src/bin/scripts/vacuumdb.c
@@ -712,7 +712,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;
+ }
}
}