pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: DROP OWNED BY fails to clean out pg_init_privs grants
Date: Fri, 26 Apr 2024 17:03:49 -0400
Message-ID: <32556.1714165429@sss.pgh.pa.us> (raw)
In-Reply-To: <F27F3F6F-A052-4EEF-9A11-3D10A867843F@yesql.se>
References: <1745535.1712358659@sss.pgh.pa.us>
	<78CCD91B-99DC-4B0F-B65E-AD46E67CBC0B@yesql.se>
	<2857513.1713733688@sss.pgh.pa.us>
	<F27F3F6F-A052-4EEF-9A11-3D10A867843F@yesql.se>

Daniel Gustafsson <daniel@yesql.se> writes:
> On 21 Apr 2024, at 23:08, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So the meson animals are not running the test that sets up the
>> problematic data.

> I took a look at this, reading code and the linked thread.  My gut feeling is
> that Stephen is right in that the underlying bug is these privileges ending up
> in pg_init_privs to begin with.  That being said, I wasn't able to fix that in
> a way that doesn't seem like a terrible hack.

Hmm, can't we put the duplicate logic inside recordExtensionInitPriv?
Even if these calls need a different result from others, adding a flag
parameter seems superior to having N copies of the logic.

A bigger problem though is that I think you are addressing the
original complaint from the older thread, which while it's a fine
thing to fix seems orthogonal to the failure we're seeing in the
buildfarm.  The buildfarm's problem is not that we're recording
incorrect pg_init_privs entries, it's that when we do create such
entries we're failing to show their dependency on the grantee role
in pg_shdepend.  We've missed spotting that so far because it's
so seldom that pg_init_privs entries reference any but built-in
roles (or at least roles that'd likely outlive the extension).

			regards, tom lane





view thread (53+ messages)  latest in thread

Message-ID: <32556.1714165429@sss.pgh.pa.us>
Permalink:  ../32556.1714165429@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/32556.1714165429@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@yesql.se, sfrost@snowman.net, andres@anarazel.de
  Subject: Re: DROP OWNED BY fails to clean out pg_init_privs grants
  In-Reply-To: <32556.1714165429@sss.pgh.pa.us>
  References: <1745535.1712358659@sss.pgh.pa.us> <78CCD91B-99DC-4B0F-B65E-AD46E67CBC0B@yesql.se> <2857513.1713733688@sss.pgh.pa.us> <F27F3F6F-A052-4EEF-9A11-3D10A867843F@yesql.se> <32556.1714165429@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