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

From Heikki Linnakangas
Subject Re: 'replication' keyword on .pgpass (Streaming Replication)
Date
Msg-id 4B45D60D.5030308@enterprisedb.com
Whole thread Raw
In response to Re: 'replication' keyword on .pgpass (Streaming Replication)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: advantage of new vacuum
Next
From: Bruce Momjian
Date:
Subject: Re: pg_migrator issues