From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: SR slaves and .pgpass |
Date: | 2010-06-07 06:13:08 |
Message-ID: | AANLkTilutm2Y0z4glf3UCmYsCFCtMR1QcyWzB_AxCUKj@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jun 7, 2010 at 5:42 AM, Andrew Dunstan <andrew(at)dunslane(dot)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 password are 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> string or 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
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-06-07 06:48:59 | Re: [PATCH] Fix leaky VIEWs for RLS |
Previous Message | KaiGai Kohei | 2010-06-07 05:29:21 | Re: [PATCH] Fix leaky VIEWs for RLS |