Harmonize password reuse in vacuumdb, clusterdb, and reindexdb.
Commits83dec5a712
andff402ae11b
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
This commit is contained in:
parent
e055b6be7e
commit
6d982e3b3b
|
@ -432,20 +432,6 @@ PostgreSQL documentation
|
|||
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1>
|
||||
<title>Notes</title>
|
||||
|
||||
<para>
|
||||
<application>reindexdb</application> might need to connect several
|
||||
times to the <productname>PostgreSQL</productname> server, asking
|
||||
for a password each time. It is convenient to have a
|
||||
<filename>~/.pgpass</filename> file in such cases. See <xref
|
||||
linkend="libpq-pgpass"/> for more information.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1>
|
||||
<title>Examples</title>
|
||||
|
||||
|
|
|
@ -605,19 +605,6 @@ PostgreSQL documentation
|
|||
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1>
|
||||
<title>Notes</title>
|
||||
|
||||
<para>
|
||||
<application>vacuumdb</application> might need to connect several
|
||||
times to the <productname>PostgreSQL</productname> server, asking
|
||||
for a password each time. It is convenient to have a
|
||||
<filename>~/.pgpass</filename> file in such cases. See <xref
|
||||
linkend="libpq-pgpass"/> for more information.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Examples</title>
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ cluster_one_database(const ConnParams *cparams, const char *table,
|
|||
|
||||
PGconn *conn;
|
||||
|
||||
conn = connectDatabase(cparams, progname, echo, false, false);
|
||||
conn = connectDatabase(cparams, progname, echo, false, true);
|
||||
|
||||
initPQExpBuffer(&sql);
|
||||
|
||||
|
|
|
@ -315,7 +315,7 @@ reindex_one_database(ConnParams *cparams, ReindexType type,
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
* 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 *
|
||||
|
|
Loading…
Reference in New Issue