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 1ohBWq-0001RO-TZ for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Oct 2022 15:14:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ohBWo-0005Vu-LQ for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Oct 2022 15:14:14 +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 1ohBWo-0005Vc-CO for pgsql-hackers@lists.postgresql.org; Sat, 08 Oct 2022 15:14:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohBWm-0000wT-8o for pgsql-hackers@postgresql.org; Sat, 08 Oct 2022 15:14:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 298FE6rj3574713; Sat, 8 Oct 2022 11:14:06 -0400 From: Tom Lane To: Joe Conway cc: Nathan Bossart , Michael Paquier , Joshua Brindle , PostgreSQL-development Subject: Re: use has_privs_of_role() for pg_hba.conf In-reply-to: <87994809-5b2c-08f0-0ab3-3c76c49afada@joeconway.com> References: <20220404142551.GB663209@nathanxps13> <491dba16-55df-d5fd-1ae7-01b5140987f0@joeconway.com> <20221006174343.GA444656@nathanxps13> <20221007032711.GA499771@nathanxps13> <20221007194430.GA550749@nathanxps13> <3347532.1665173939@sss.pgh.pa.us> <20221007215836.GB814385@nathanxps13> <87994809-5b2c-08f0-0ab3-3c76c49afada@joeconway.com> Comments: In-reply-to Joe Conway message dated "Sat, 08 Oct 2022 10:38:00 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3574711.1665242046.1@sss.pgh.pa.us> Date: Sat, 08 Oct 2022 11:14:06 -0400 Message-ID: <3574712.1665242046@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Joe Conway writes: > Thanks -- looks good to me. If there are no other comments or concerns, > I will commit/push by the end of the weekend. Robert seems to think that this patch might be completely misguided, so I'm not sure we have real consensus. I think he may have a point. An angle that he didn't bring up is that we've had proposals, and even I think a patch, for inventing database-local privileges. If that were to become a thing, it would interact very badly with this idea, because it would often not be clear which set of privileges to consider. As long as HBA checks consider membership, and we don't invent database-local role membership, there's no problem. regards, tom lane