Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smxbr-0005gL-H5 for pgsql-bugs@arkaria.postgresql.org; Sat, 07 Sep 2024 15:44:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1smxas-000RYc-NN for pgsql-bugs@arkaria.postgresql.org; Sat, 07 Sep 2024 15:43:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smxas-000RYU-EM for pgsql-bugs@lists.postgresql.org; Sat, 07 Sep 2024 15:43:22 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smxal-0000gn-4M for pgsql-bugs@lists.postgresql.org; Sat, 07 Sep 2024 15:43:21 +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 487FhDJl2504378; Sat, 7 Sep 2024 11:43:13 -0400 From: Tom Lane To: "David G. Johnston" cc: Joe Conway , Christophe Pettus , Basha , PostgreSQL Bug List Subject: Re: [EXT]: Re: BUG #18604: Regression in PostgreSQL 16.4: pg_dump Prevents Essential System Table Modifications In-reply-to: References: <18604-04d64b68e981ced6@postgresql.org> <3B462E2E-88B6-43B9-943F-90E883D33357@thebuild.com> <183A6734-06B2-48E9-A5C9-235EF87B0DFB@thebuild.com> <6860E1BC-DA5A-4576-9FB6-35ED31E6F017@thebuild.com> <73AD2F56-1009-49C7-8752-39C45325A9BB@thebuild.com> <01CF2C94-D153-4687-B2EF-EF4B4B1890DF@thebuild.com> <2410942.1725675471@sss.pgh.pa.us> <8D1E6C08-1C4B-4056-846F-C33C0056249E@thebuild.com> <172a934d-6a5d-4c57-9935-43862025b842@joeconway.com> Comments: In-reply-to "David G. Johnston" message dated "Sat, 07 Sep 2024 07:38:35 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2504376.1725723793.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 07 Sep 2024 11:43:13 -0400 Message-ID: <2504377.1725723793@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > That said, I=E2=80=99d need to go back and see the arguments for why we = don=E2=80=99t just > filter the list of globals to whatever the logged in role is capable of > using. Filtering roles this way would require a whole lot more thought, and I doubt you could get away with just hiding roles that the current user can't become. As an example, it would be sad if \df+ stopped showing any built-in functions because it failed to join their pg_proc.proowner to pg_roles. In the particular case of \df+, it looks like it'd actually continue to work because it goes through pg_get_userbyid() which wouldn't pay any attention to RLS anyway. ACL display is another obvious place that would leak role names. So there's also a boatload of questions around leakage of the supposedly hidden roles. pg_database is not nearly as entwined with the local catalogs, so I think what I suggested would be enough in practice for that. regards, tom lane