postgres.git / summary / log / commit / refs

commit    a475b1e77e13ce282603e4133c7cbcbd537d508c
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Thu May 09 01:30:08 2019 +0000
First released in: 12.0, 9.5.18, 9.6.14, 10.9, 11.4

    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


src/bin/scripts/vacuumdb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c index a5fcd30478d..b6f30030e99 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -518,7 +518,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; + } } } [parent: 2be2fee24839]