On 2019-Jul-19, Julien Rouhaud wrote: > > For the second patch, could you send a rebase with a fix for the > > connection slot when processing the reindex commands? > > Attached, I also hopefully removed all the now unneeded progname usage.
BTW "progname" is a global variable in logging.c, and it's initialized by pg_logging_init(), so there's no point in having a local variable in main() that's called the same and initialized the same way. You could just remove it from the signature of all those functions (connectDatabase and callers), and there would be no visible change. Also: [see attached] -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
commit 957e56dee9a8b32f8f409a516a0195ceb3bc6a75 Author: Alvaro Herrera <alvhe...@alvh.no-ip.org> AuthorDate: Mon Jul 22 11:09:18 2019 -0400 CommitDate: Mon Jul 22 11:09:30 2019 -0400 remove useless progname diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c index d3ee0da917..d81bfa3a6b 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -57,7 +57,7 @@ static void prepare_vacuum_command(PQExpBuffer sql, int serverVersion, vacuumingOptions *vacopts, const char *table); static void run_vacuum_command(PGconn *conn, const char *sql, bool echo, - const char *table, const char *progname); + const char *table); static void help(const char *progname); @@ -646,7 +646,7 @@ vacuum_one_database(const char *dbname, vacuumingOptions *vacopts, * through ParallelSlotsGetIdle. */ run_vacuum_command(free_slot->connection, sql.data, - echo, tabname, progname); + echo, tabname); cell = cell->next; } while (cell != NULL); @@ -855,7 +855,7 @@ prepare_vacuum_command(PQExpBuffer sql, int serverVersion, */ static void run_vacuum_command(PGconn *conn, const char *sql, bool echo, - const char *table, const char *progname) + const char *table) { bool status;