pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christophe Pettus <xof@thebuild.com>
Cc: Basha <Basha@maxcontact.com>
Cc: PostgreSQL Bug List <pgsql-bugs@lists.postgresql.org>
Subject: Re: [EXT]: Re: BUG #18604: Regression in PostgreSQL 16.4: pg_dump Prevents Essential System Table Modifications
Date: Fri, 06 Sep 2024 20:24:59 -0400
Message-ID: <2398396.1725668699@sss.pgh.pa.us> (raw)
In-Reply-To: <183A6734-06B2-48E9-A5C9-235EF87B0DFB@thebuild.com>
References: <18604-04d64b68e981ced6@postgresql.org>
	<3B462E2E-88B6-43B9-943F-90E883D33357@thebuild.com>
	<GV1P194MB2356E0520E83B40CE57D4D2FD89E2@GV1P194MB2356.EURP194.PROD.OUTLOOK.COM>
	<183A6734-06B2-48E9-A5C9-235EF87B0DFB@thebuild.com>

Christophe Pettus <xof@thebuild.com> writes:
> You've really stepped outside what is considered supported behavior here.  That it worked at all was more accidental than a documented and supported feature.  Shadowing system catalogs with views *is* going to break things, and that `allow_system_table_mods` has that potential is documented.  I'm sure this is frustrating, but it's extremely unlikely that this will be considered a regression worth undoing a security fix for.

Indeed.  You might look into enforcing the restriction you want
by attaching an RLS policy to pg_database, instead of this hack.
Mind you, we are unlikely to consider that supported either if push
comes to shove.  But it would at least dodge your immediate problem.

(I'll just note that this implementation is full of holes anyway: you
didn't mark the view as a security_barrier view, and that treatment of
tableoid is hardly transparent.  And I do hope that your real recipe
includes revoking public read access on pg_database_catalog.)

			regards, tom lane





view thread (30+ messages)  latest in thread

Message-ID: <2398396.1725668699@sss.pgh.pa.us>
Permalink:  ../2398396.1725668699@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2398396.1725668699@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, xof@thebuild.com, Basha@maxcontact.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: [EXT]: Re: BUG #18604: Regression in PostgreSQL 16.4: pg_dump Prevents Essential System Table Modifications
  In-Reply-To: <2398396.1725668699@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox