Re: Logical replication subscription owner

2020-05-09 Thread Euler Taveira
On Fri, 8 May 2020 at 03:03, Kyotaro Horiguchi wrote: > > A user can start physical replication without needing CONNECT on any > database if it has REPLICATION attribute. That means any user that > is allowed logical replication on a specific database (or even no > databases) can replicate the w

Re: Logical replication subscription owner

2020-05-09 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> ISTM those statements are contradictory. The two privileges could >> only be called orthogonal if it's possible to make use of one without >> having the other. As things stand, REPLICATION without LOGIN is an >> entirely useless s

Re: Logical replication subscription owner

2020-05-09 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Michael Paquier writes: > > Not to make the life of everybody more complicated here, but I don't > > agree. LOGIN and REPLICATION are in my opinion completely orthogonal > > and it sounds more natural IMO that a REPLICATION user should be able

Re: Logical replication subscription owner

2020-05-09 Thread Tom Lane
Michael Paquier writes: > Not to make the life of everybody more complicated here, but I don't > agree. LOGIN and REPLICATION are in my opinion completely orthogonal > and it sounds more natural IMO that a REPLICATION user should be able > to log into the server only if it has LOGIN defined. IST

Re: Logical replication subscription owner

2020-05-09 Thread Michael Paquier
On Fri, May 08, 2020 at 03:03:26PM +0900, Kyotaro Horiguchi wrote: > At Fri, 8 May 2020 01:02:11 -0400, Alvaro Herrera > wrote in >> On 2020-May-07, Tom Lane wrote: >>> FWIW, I would argue that LOGIN permits logging in on a regular SQL >>> connection, while REPLICATION should permit logging in o

Re: Logical replication subscription owner

2020-05-07 Thread Kyotaro Horiguchi
At Fri, 8 May 2020 01:02:11 -0400, Alvaro Herrera wrote in > On 2020-May-07, Tom Lane wrote: > > > FWIW, I would argue that LOGIN permits logging in on a regular SQL > > connection, while REPLICATION should permit logging in on a > > replication connection, and there's no reason for either to d

Re: Logical replication subscription owner

2020-05-07 Thread Alvaro Herrera
On 2020-May-07, Tom Lane wrote: > FWIW, I would argue that LOGIN permits logging in on a regular SQL > connection, while REPLICATION should permit logging in on a > replication connection, and there's no reason for either to depend on > or require the other. I agree with this. > >> Also- what ab

Re: Logical replication subscription owner

2020-05-07 Thread Tom Lane
Alvaro Herrera writes: > I'd welcome input from other people on this issue; only now I noticed > that it's buried in pgsql-docs, so CCing pgsql-hackers now. FWIW, I would argue that LOGIN permits logging in on a regular SQL connection, while REPLICATION should permit logging in on a replication c

Re: Logical replication subscription owner

2020-05-07 Thread Alvaro Herrera
I'd welcome input from other people on this issue; only now I noticed that it's buried in pgsql-docs, so CCing pgsql-hackers now. On 2020-Apr-23, Stephen Frost wrote: > Greetings, > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Alvaro Herrera writes: > > > I had it in my mind that LOGIN was for

Re: Logical replication subscription owner

2020-04-23 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Alvaro Herrera writes: > > I had it in my mind that LOGIN was for regular (SQL-based) login, and > > REPLICATION was for replication login, and that they were orthogonal. > > Yeah, that's what I would've expected. Otherwise, is REPLICATION > w

Re: Logical replication subscription owner

2020-04-22 Thread Tom Lane
Alvaro Herrera writes: > I had it in my mind that LOGIN was for regular (SQL-based) login, and > REPLICATION was for replication login, and that they were orthogonal. Yeah, that's what I would've expected. Otherwise, is REPLICATION without LOGIN useful at all? regards, t

Re: Logical replication subscription owner

2020-04-22 Thread Alvaro Herrera
On 2020-Apr-22, Stephen Frost wrote: > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > > I wonder if a better answer is to allow the connection when the > > REPLICATION priv is granted, ignoring the LOGIN prov. > > Erm, no, I wouldn't have thought that'd make sense- maybe someone > specifica

Re: Logical replication subscription owner

2020-04-22 Thread Stephen Frost
Greetings, * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > On 2020-Apr-15, PG Doc comments form wrote: > > If the logical replication subscription is owned by a role that is not > > allowed to login (for example, if the LOGIN privilege is removed after the > > subscription is created) then th

Re: Logical replication subscription owner

2020-04-22 Thread Alvaro Herrera
On 2020-Apr-15, PG Doc comments form wrote: > If the logical replication subscription is owned by a role that is not > allowed to login (for example, if the LOGIN privilege is removed after the > subscription is created) then the logical replication worker (which uses the > owner to connect to the