summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-05-09 10:29:40 +0900
committerMichael Paquier <michael@paquier.xyz>2019-05-09 10:29:40 +0900
commitdb8802a99ed75e1f8f5ffab199cea7fb6f63a057 (patch)
treedb50cd51678fd469497d2fced6272c0b3d82aec7
parent704637d8d935bee52f748641a0620e2e83de07d2 (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
-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 15c07f9069b..38753e94e23 100644
--- a/src/bin/scripts/vacuumdb.c
+++ b/src/bin/scripts/vacuumdb.c
@@ -525,7 +525,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;
+ }
}
}