'replication' keyword on .pgpass (Streaming Replication) - Mailing list pgsql-hackers

From Fujii Masao
Subject 'replication' keyword on .pgpass (Streaming Replication)
Date
Msg-id 3f0b79eb1001051953u765fd1d8m9bc615c8ff1880c@mail.gmail.com
Whole thread Raw
Responses Re: 'replication' keyword on .pgpass (Streaming Replication)  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: 'replication' keyword on .pgpass (Streaming Replication)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Dec 26, 2009 at 10:55 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Fri, Dec 25, 2009 at 9:56 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>> I don't see the use case for it - .pgpass is for single users, not a whole
>> cluster. And it does support wildcards, which takes care of the 'all' case.
>> In the case of pg_hba.conf we don't know in advance who will actually be
>> connecting. But in the case of .pgpass we do, so the extra utility of
>> 'sameuser', 'samerole' and 'samegroup' in this case is not apparent to me.
>
> OK, I might need to focus only on the use of replication, without
> being avaricious.

The attached patch supports new keyword 'replication' on .pgpass file.
This keyword is used to specify the password for the standby server to
connect to the primary server.

Without this keyword, since replication doesn't correspond to the real
database, the password cannot be supplied in .pgpass file, instead,
must be specified in the conninfo string or the environment variable
PGPASSWORD.

For example, if the primary is running on host IP 192.168.1.50, port 5432,
the superuser's name for replication is foo, and the password is foopass,
the following line should be added to the .pgpass file on the standby so
that it can connect to the primary without prompting for password.

    192.168.1.50:5432:replication:foo:foopass

Thought?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment

pgsql-hackers by date:

Previous
From: u235sentinel
Date:
Subject: Re: Auto-extending table partitions?
Next
From: Takahiro Itagaki
Date:
Subject: Re: New VACUUM FULL