From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: vacuumdb: don't prompt for passwords over and over
Date: Thu, 12 Nov 2015 21:22:26 +0000
Message-ID: <E1ZwzK6-0004n3-ES@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
vacuumdb: don't prompt for passwords over and over
Having the script prompt for passwords over and over was a preexisting
problem when it processed multiple databases or when it processed
multiple analyze stages, but the parallel mode introduced in commit
a179232047 made it worse.
Fix the annoyance by keeping a copy of the password used by the first
connection that requires one. Since users can (currently) only have a
single password, there's no need for more complex arrangements (such as
remembering one password per database).
Per bug #13741 reported by Eric Brown. Patch authored and
cross-reviewed by Haribabu Kommi and Michael Paquier, slightly tweaked
by Álvaro Herrera.
Discussion: http://www.postgresql.org/message-id/20151027193919.931.54948@wrigleys.postgresql.org
Backpatch to 9.5, where parallel vacuumdb was introduced.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/83dec5a712af251af15effbf781ddaedc3bf6b3b
Modified Files
--------------
src/bin/scripts/clusterdb.c | 2 +-
src/bin/scripts/common.c | 39 +++++++++++++++----------
src/bin/scripts/common.h | 4 +--
src/bin/scripts/createlang.c | 8 ++---
src/bin/scripts/createuser.c | 4 +--
src/bin/scripts/droplang.c | 8 ++---
src/bin/scripts/dropuser.c | 4 +--
src/bin/scripts/reindexdb.c | 8 ++---
src/bin/scripts/vacuumdb.c | 66 +++++++++++++++++++++++++++++++++++-------
9 files changed, 98 insertions(+), 45 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: vacuumdb: don't prompt for passwords over and over
In-Reply-To: <E1ZwzK6-0004n3-ES@gemulon.postgresql.org>
References: <E1ZwzK6-0004n3-ES@gemulon.postgresql.org>
* 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