Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRa5N-0002Qv-Iu for pgsql-docs@arkaria.postgresql.org; Thu, 23 Apr 2020 11:32:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jRa5M-0007uT-7B for pgsql-docs@arkaria.postgresql.org; Thu, 23 Apr 2020 11:32:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRa5M-0007uM-1Y for pgsql-docs@lists.postgresql.org; Thu, 23 Apr 2020 11:32:04 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jRa5E-0002kM-KJ for pgsql-docs@lists.postgresql.org; Thu, 23 Apr 2020 11:32:02 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 737075F7AD; Thu, 23 Apr 2020 07:31:55 -0400 (EDT) Date: Thu, 23 Apr 2020 07:31:55 -0400 From: Stephen Frost To: Tom Lane Cc: Alvaro Herrera , chris+postgresql@qwirx.com, pgsql-docs@lists.postgresql.org Subject: Re: Logical replication subscription owner Message-ID: <20200423113155.GC13712@tamriel.snowman.net> References: <20200422225911.GA10161@alvherre.pgsql> <8465.1587597281@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DZGCK+FyHJhY5w/A" Content-Disposition: inline In-Reply-To: <8465.1587597281@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --DZGCK+FyHJhY5w/A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Tom Lane (tgl@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. >=20 > Yeah, that's what I would've expected. Otherwise, is REPLICATION > without LOGIN useful at all? No, but it's less surprising, at least to me, for all roles that login to require having the LOGIN right. Having REPLICATION ignore that would be surprising (and a change from today). Maybe if we called it REPLICATIONLOGIN or something along those lines it would be less surprising, but it still seems pretty awkward. I view REPLICATION as allowing a specific kind of connection, but you first need to be able to login. Also- what about per-database connections? Does having REPLICATION mean you get to override the CONNECT privileges on a database, if you're connecting for the purposes of doing logical replication? I agree we could do better in these areas, but I'd argue that's mostly around improving the documentation rather than baking in implications that one privilege implies another. We certainly get people who complain about getting a permission denied error when they have UPDATE rights on a table (but not SELECT) and they include a WHERE clause in their update statement, but that doesn't mean we should assume that having UPDATE rights means you also get SELECT rights, just because UPDATE is next to useless without SELECT. Thanks, Stephen --DZGCK+FyHJhY5w/A Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJeoXyrAAoJEO1sijiDR2RVYdoP/ApgG66tuzU2EN3Kwi/KQkVF HdzkxmrLRueEchrPXLtDyJe0SjxrPsjwqsqDTmfl3mTd0KIzhhsasXMp0H3qQxYM jMfvyelsX8P9LMJrxkycSgKF4kQhgcDTdZcDIMRCjcCihqwBv5uNWbHntySv077F uq5qZTn7jTEtUcWNomIKyOTe/c/qQqi4J5ele2NJoxugW5rAQ7y44sAjBgrRILQ7 GSkFqgWFZFXdmu2z9MAm5UQiOIns4Z3xFRnqGEw7Wv1UEthxFL5yveWHnPPrwjwK BvbhX7uVglIaOu3MD3ZaHQuLWN6s8IWmyRQ/fBEVKWjF8VJnHuhfIlmQdnEbwb2t TQVJibMBmVPgSEDrDmd+Q5899BGB0HONLjZ9mFjeprgN5cmF5D85uYJRlhl2i82K FEFXArBpOfz2gZV9fw29pRA7bccA6HjbCzXTOakoSa+00nY4IOHRI0WNkgUAi8VU Evqe6YJOfSs54v7lIIc1VZkSashMDy1QCRE4oBTS0nn0RnX+oaO4PnLOFiasV9GG 5kE95r22+X6Y6oV9GzAp3ELaiBfrMfyroJF/P4z6bx992lxDKj8shYsJXSph3Nwv Q/LqMeEx/J2WEbZKwfT8RQC3HbtVO/IWoOf99IAMhlYG0kP1kahHL/A/qiV2Q98D R6zP/rV7TUKKpIIoVzYt =b/C6 -----END PGP SIGNATURE----- --DZGCK+FyHJhY5w/A--