Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpa4v-0000vN-0a for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 15:18:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpa4t-00035l-Rk for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2019 15:18:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpa4t-00035e-J5 for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 15:18:15 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpa4q-0000iL-SV for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2019 15:18:15 +0000 Received: by mail-qk1-x744.google.com with SMTP id d15so28856158qkl.4 for ; Mon, 22 Jul 2019 08:18:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=GKJEgYBHeNPM4i+ZCmW62E9fRmwLRhCUNXBPmg0Sa4Q=; b=H82EHJeOWlaa12SfgoNSE2JXxPTBsVK3cy1ENVxpmARmUcqJColYtBtgwLU70c2tzm bujO0JYo161P6PPTtWpDXgLONHhHVEO3nl4w3DSMzmDh6xThiv88jIFzSNAh9Wxwwz11 kPIV4OoH/j3IJFU42vF1Vksa47uhUrTYf1US/b8ZtSG0cOcFsUEldGBFQBZ3GesRl4Zy yOP6ptCSv4v28XlyktDpFpUQbGGVtk8qxTVsb6qv9gh7Arf9ihbENIX4z8toOFKCjhHW p/N8txsH1EUZvPsKS1BmOpKrRcMr6saZxSCGyHEGFbpWtWY6tr8SOlxN54tYKJhQTs8V X5nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=GKJEgYBHeNPM4i+ZCmW62E9fRmwLRhCUNXBPmg0Sa4Q=; b=q9fZNdjjh7iYRpIqt9Sv0LpDtlYXYvK2P3dpg5F9jdmCFJYwQHyqYfiEcc9lwscc7L NkZKTZM/4K1DaEMfABkulpgzANKvxrMWiZypZgQ31mje9lB5sh1sSbIlVyhQFVTMNH7n I9eGyMYpnrHRTKIk8LTemz4ecxWEBkzeqVXZDa8Y5qMRaNlgx4umNmq1Pzn9VHe50TQg mXIqrsBVVWimPixeTDLXkV2f1t/Eoa7I/d/24CeSAPOv+7x0m8kf8dd5kcO1rEaeGwqX v+GhqMC+kVSPOXbvzrlutQLSlUhscd6KOUXZdFrwLv/aG/yFXnKGcPypCXCRDJPqYTTV Frdw== X-Gm-Message-State: APjAAAV27Ys4ZZ4XIbc4jNHhgCkQDkUFNI3Te7Ca1Ia9Sae38wfzMZ6e bsRFAsGh0MKONpX/8UQ1hY93PQ== X-Google-Smtp-Source: APXvYqyzxT/sOckH1Ej/w3U5XMkJXLn2HAxG6ozSvLPDVMYrF9++9RHaAd7zqx0npWUMgUN1fTIAuQ== X-Received: by 2002:a37:a5d1:: with SMTP id o200mr48640818qke.93.1563808690817; Mon, 22 Jul 2019 08:18:10 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.139.202]) by smtp.gmail.com with ESMTPSA id w19sm16333195qkj.66.2019.07.22.08.18.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 08:18:10 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id B1B1A12082F; Mon, 22 Jul 2019 11:18:06 -0400 (-04) Date: Mon, 22 Jul 2019 11:18:06 -0400 From: Alvaro Herrera To: Julien Rouhaud Cc: Michael Paquier , Peter Eisentraut , Thomas Munro , Daniel Verite , Tom Lane , PostgreSQL Hackers , Kevin Grittner Subject: Re: Add parallelism and glibc dependent only options to reindexdb Message-ID: <20190722151806.GA22634@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 --3MwIy2ne0vdjdPXF Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="less-progname.patch" commit 957e56dee9a8b32f8f409a516a0195ceb3bc6a75 Author: Alvaro Herrera 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; --3MwIy2ne0vdjdPXF--