From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Kevin Grittner <kgrittn@gmail.com>
Subject: Re: Add parallelism and glibc dependent only options to reindexdb
Date: Mon, 22 Jul 2019 11:18:06 -0400
Message-ID: <20190722151806.GA22634@alvherre.pgsql> (raw)
In-Reply-To: <CAOBaU_Y+XxTVfZLA38gv9KHzPPwLrUhoc5Q1BunieLouyjCu7g@mail.gmail.com>
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
Attachments:less-progname.patch (text/x-diff, 1.3K) download
commit 957e56dee9a8b32f8f409a516a0195ceb3bc6a75
Author: Alvaro Herrera <alvherre@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.cindex 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;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, rjuju123@gmail.com, michael@paquier.xyz, peter.eisentraut@2ndquadrant.com, thomas.munro@gmail.com, daniel@manitou-mail.org, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org, kgrittn@gmail.com
Subject: Re: Add parallelism and glibc dependent only options to reindexdb
In-Reply-To: <20190722151806.GA22634@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox