Tom Lane wrote:
> Fujii Masao <masao.fujii@gmail.com> writes:
>> 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.
>
> This strikes me as a completely bad idea. We need get no farther than
> the point that it assumes nobody can have a database named "replication"
> (although I notice the patch also appears to assume that libpq knows
> internally that the connection is for replication --- I thought we were
> going to avoid libpq changes for SR?)
As the patch stands there's an extra startup packet, similar to
SSLRequest, in the connection handshake. But I think we should get rid
of that too, and just send an extra "replication=on" option along with
username and other options in the startup packet.
(as Fujii pointed out already, you can have a database called
"replication". But you need to quote it in pg_hba.conf, like you need to
quote "all" and "sameuser/group/role".)
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com