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 1jWs74-0001Nk-T7 for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2020 01:47:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jWs73-0005vc-Ow for pgsql-hackers@arkaria.postgresql.org; Fri, 08 May 2020 01:47:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWs73-0005qr-Dq for pgsql-hackers@lists.postgresql.org; Fri, 08 May 2020 01:47:41 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jWs70-0005Ah-M0 for pgsql-hackers@lists.postgresql.org; Fri, 08 May 2020 01:47:40 +0000 Received: by mail-qt1-x842.google.com with SMTP id j2so26157qtr.12 for ; Thu, 07 May 2020 18:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=VbwJ3MH9x69rMI7YaAH5xDrLy7mod7TKIMo9Zr6lL4g=; b=uHs2IBxyRmLqz9huOi47l8PU9VvTWMnCgz+HIOxDNZ1bvAwugVk2kvLwdcpeUqOajT aesy+K6S3kFBJAbu06l2UoxA4dXGNDyeM6jJDL9C7th27gjCwnCfm3CpZW8G4RSNVjrt 2tTjwlafI2Tb3PRf6ilDjhROu66ZuesO7U6paT8f5jfp62rHvhiZbQdAasVVQAf3EEf5 QJn0DkhYKe76zz1shuwGL0Uv/7nORVvo+Pvji50WDDxTC0IA3AZNyf920fMFsRrwEqIB QLJx79BEodEEY7FiWZXwFQZZoGiBsElDuJMGJTkHPmQscFFG5k1A211k3SQerrtURPrM 05bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=VbwJ3MH9x69rMI7YaAH5xDrLy7mod7TKIMo9Zr6lL4g=; b=HSDQrF9FG7Lor18FvYSO4/bgHaQarnjXXXXMt9sTeasYkV5KFYWwfOAKBGNOYNOijE iG23pQ+R57aZXhFC7aAfCDL1UYwNrgASahn/zdN0r63qdHLpS9twf5Kw/sof65dsmXZ6 eWaMZYlirKw9CkkjZc/k2czp3x2hn86NsA7a5oxho8lcFLCrVZVHLftL0BxP6cFnaswI yT+fXq4ARYPTGXU9by7XKV14OWfLeGPP04nCiJZ+JVqC7sdLEvLyHD0zEoMH6AyREojZ Ba2/bOis5iBDm5ms7obCPSIGg4Q/bCi7FalzjhoSCsHMaKtjtzViVZSaZG1yanKnePry 1xNA== X-Gm-Message-State: AGi0PuaDke9Vu5N01AfOtqXCo44t5TQ9JHMwap8IFz39hiNebetuKv/S tQ3uHL+AI0KQzSub6P0Xy4D7+g== X-Google-Smtp-Source: APiQypIV9ZU7G62uDoquFKDO0fyf/HGelxlssRrKxxKJxch16TqMmlezZpbNSGzpZVb78D2ITO/wrg== X-Received: by 2002:ac8:44af:: with SMTP id a15mr455302qto.35.1588902457544; Thu, 07 May 2020 18:47:37 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id q32sm287190qta.13.2020.05.07.18.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 18:47:36 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 3F174300ABE; Thu, 7 May 2020 21:47:34 -0400 (-04) Date: Thu, 7 May 2020 21:47:34 -0400 From: Alvaro Herrera To: Stephen Frost Cc: Tom Lane , chris+postgresql@qwirx.com, pgsql-docs@lists.postgresql.org, pgsql-hackers@lists.postgresql.org, Peter Eisentraut Subject: Re: Logical replication subscription owner Message-ID: <20200508014734.GA3552@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200423113155.GC13712@tamriel.snowman.net> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 (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. > > > > 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 -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services