Commits
83dec5a712 and
ff402ae11b taught vacuumdb to reuse
passwords instead of prompting repeatedly. However, the docs still
warn about repeated prompts, and this improvement was not applied
to clusterdb and reindexdb. This commit allows clusterdb and
reindexdb to reuse passwords just like vacuumdb does, and it
expunges the aforementioned warnings from the docs.
Reviewed-by: Gurjeet Singh, Zhang Mingli
Discussion: https://postgr.es/m/
20230628045741.GA1813397%40nathanxps13
-
-
-
Notes
-
-
reindexdb might need to connect several
- times to the
PostgreSQL server, asking
- for a password each time. It is convenient to have a
-
~/.pgpass file in such cases. See
- linkend="libpq-pgpass"/> for more information.
-
-
-
-
Examples
-
-
-
Notes
-
-
vacuumdb might need to connect several
- times to the
PostgreSQL server, asking
- for a password each time. It is convenient to have a
-
~/.pgpass file in such cases. See
- linkend="libpq-pgpass"/> for more information.
-
-
-
Examples
PGconn *conn;
- conn = connectDatabase(cparams, progname, echo, false, false);
+ conn = connectDatabase(cparams, progname, echo, false, true);
initPQExpBuffer(&sql);
bool failed = false;
int items_count = 0;
- conn = connectDatabase(cparams, progname, echo, false, false);
+ conn = connectDatabase(cparams, progname, echo, false, true);
if (concurrently && PQserverVersion(conn) < 120000)
{
*
* If allow_password_reuse is true, we will try to re-use any password
* given during previous calls to this routine. (Callers should not pass
- * allow_password_reuse=true unless reconnecting to the same database+user
+ * allow_password_reuse=true unless reconnecting to the same host+port+user
* as before, else we might create password exposure hazards.)
*/
PGconn *