Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6d982e3

Browse files
Harmonize password reuse in vacuumdb, clusterdb, and reindexdb.
Commits83dec5a andff402ae taught vacuumdb to reusepasswords instead of prompting repeatedly. However, the docs stillwarn about repeated prompts, and this improvement was not appliedto clusterdb and reindexdb. This commit allows clusterdb andreindexdb to reuse passwords just like vacuumdb does, and itexpunges the aforementioned warnings from the docs.Reviewed-by: Gurjeet Singh, Zhang MingliDiscussion:https://postgr.es/m/20230628045741.GA1813397%40nathanxps13
1 parente055b6b commit6d982e3

File tree

5 files changed

+3
-30
lines changed

5 files changed

+3
-30
lines changed

‎doc/src/sgml/ref/reindexdb.sgml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -432,20 +432,6 @@ PostgreSQL documentation
432432

433433
</refsect1>
434434

435-
436-
<refsect1>
437-
<title>Notes</title>
438-
439-
<para>
440-
<application>reindexdb</application> might need to connect several
441-
times to the <productname>PostgreSQL</productname> server, asking
442-
for a password each time. It is convenient to have a
443-
<filename>~/.pgpass</filename> file in such cases. See <xref
444-
linkend="libpq-pgpass"/> for more information.
445-
</para>
446-
</refsect1>
447-
448-
449435
<refsect1>
450436
<title>Examples</title>
451437

‎doc/src/sgml/ref/vacuumdb.sgml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -605,19 +605,6 @@ PostgreSQL documentation
605605

606606
</refsect1>
607607

608-
609-
<refsect1>
610-
<title>Notes</title>
611-
612-
<para>
613-
<application>vacuumdb</application> might need to connect several
614-
times to the <productname>PostgreSQL</productname> server, asking
615-
for a password each time. It is convenient to have a
616-
<filename>~/.pgpass</filename> file in such cases. See <xref
617-
linkend="libpq-pgpass"/> for more information.
618-
</para>
619-
</refsect1>
620-
621608
<refsect1>
622609
<title>Examples</title>
623610

‎src/bin/scripts/clusterdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ cluster_one_database(const ConnParams *cparams, const char *table,
195195

196196
PGconn*conn;
197197

198-
conn=connectDatabase(cparams,progname,echo, false,false);
198+
conn=connectDatabase(cparams,progname,echo, false,true);
199199

200200
initPQExpBuffer(&sql);
201201

‎src/bin/scripts/reindexdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ reindex_one_database(ConnParams *cparams, ReindexType type,
315315
boolfailed= false;
316316
intitems_count=0;
317317

318-
conn=connectDatabase(cparams,progname,echo, false,false);
318+
conn=connectDatabase(cparams,progname,echo, false,true);
319319

320320
if (concurrently&&PQserverVersion(conn)<120000)
321321
{

‎src/fe_utils/connect_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
* If allow_password_reuse is true, we will try to re-use any password
2727
* given during previous calls to this routine. (Callers should not pass
28-
* allow_password_reuse=true unless reconnecting to the samedatabase+user
28+
* allow_password_reuse=true unless reconnecting to the samehost+port+user
2929
* as before, else we might create password exposure hazards.)
3030
*/
3131
PGconn*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp