Re: SR slaves and .pgpass - Mailing list pgsql-hackers
From | Fujii Masao |
---|---|
Subject | Re: SR slaves and .pgpass |
Date | |
Msg-id | AANLkTilutm2Y0z4glf3UCmYsCFCtMR1QcyWzB_AxCUKj@mail.gmail.com Whole thread Raw |
In response to | SR slaves and .pgpass (Andrew Dunstan <andrew@dunslane.net>) |
Responses |
Re: SR slaves and .pgpass
|
List | pgsql-hackers |
On Mon, Jun 7, 2010 at 5:42 AM, Andrew Dunstan <andrew@dunslane.net> wrote: > > The docs state, w.r.t. $subject: > > The password can be provided either in the primary_conninfo string > or in a separate ~/.pgpass file on the standby server. > > I tried this with a database name of "replication" in the .pgpass file, > which matches what we need to use in pg_hba.conf, but it failed miserably, > and only worked when I used a wildcard for the database name in the .pgpass > file. > > If this is expected it needs to be documented more clearly; if not, it's a > bug. Yep, this is expected, so we need to improve the doc. What about: diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 5c0d9ab..458a4e2 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -819,7 +819,9 @@ host replication foo 192.168.1.100/32 md5 <para> The host name and port number of the primary, connection user name, and passwordare specified in the <filename>recovery.conf</> file or - the corresponding environment variable on the standby. + in a separate <filename>~/.pgpass</> on the standby (In the latter case, + <literal>database</> field in a <filename>~/.pgpass</> file must be + <literal>*</>). For example, if the primary is running on host IP <literal>192.168.1.50</>, port <literal>5432</literal>, the superuser's name for replication is <literal>foo</>,and the password is <literal>foopass</>, the administrator diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml index 439db3f..cc351f8 100644 --- a/doc/src/sgml/recovery-config.sgml +++ b/doc/src/sgml/recovery-config.sgml @@ -268,9 +268,11 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows primary (see <xref linkend="streaming-replication-authentication">). A password needs to be provided too, if the primary demands password - authentication. (The password can be provided either in + authentication. The password can be provided either in the <varname>primary_conninfo</varname> stringor in a separate - <filename>~/.pgpass</> file on the standby server.) + <filename>~/.pgpass</> file on the standby server (in the latter case, + <literal>database</> field in a <filename>~/.pgpass</> file must be + <literal>*</>). Do not specify a database name in the <varname>primary_conninfo</varname> string. </para> Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
pgsql-hackers by date: