pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Noah Misch <noah@leadboat.com>
Cc: pgsql-bugs@lists.postgresql.org, Färber, Franz-Josef (StMUK) <Franz-Josef.Faerber@stmuk.bayern.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Extension pg_trgm, permissions and pg_dump order
Date: Tue, 31 May 2022 08:28:55 -0700
Message-ID: <20220531152855.GA2236210@nathanxps13> (raw)
In-Reply-To: <YpWZ02YEN9pipA6M@paquier.xyz>
References: <f8a4105f076544c180a87ef0c4822352@stmuk.bayern.de>
	<1961551.1653498155@sss.pgh.pa.us>
	<20220526055047.GA3153526@rfd.leadboat.com>
	<20220528045122.GA3228881@rfd.leadboat.com>
	<20220529033033.GA1973706@nathanxps13>
	<20220529043403.GB3265235@rfd.leadboat.com>
	<YpWZ02YEN9pipA6M@paquier.xyz>

On Tue, May 31, 2022 at 01:30:11PM +0900, Michael Paquier wrote:
> On Sat, May 28, 2022 at 09:34:03PM -0700, Noah Misch wrote:
>> On Sat, May 28, 2022 at 08:30:33PM -0700, Nathan Bossart wrote:
>>> I started looking at the problem and hacked together a
>>> proof-of-concept based on your first candidate that seems to fix the
>>> reported issue.  However, from the upthread discussion, it is not clear
>>> whether there is agreement on the approach.  IIUC there are still many
>>> other code paths that would require a similar treatment, so perhaps
>>> identifying all of those would be a good next step.
>> 
>> Agreed.  To identify them, perhaps put an ereport(..., errbacktrace()) in
>> aclmask(), then write some index-creating DDL that refers to the
>> largest-possible number of objects.
> 
> While we've reached an agreement on the thread related to the
> corruption caused by the incorrect snapshots for concurrent index
> builds, this thread seems to be stalling a bit and we should try to
> move on before getting a release out.  Is somebody looking at what we
> have here?

I've spent some time looking at all the code impacted by a117ceb and
0abc1a0, and I've yet to identify any additional problems besides the one
with ResolveOpClass().  However, I'm far from confident in this analysis,
and I still need to try out the ereport() approach that Noah suggested.  I
would welcome any assistance identifying other problem areas.

For now, I've attached a slightly polished patch to fix the reported issue.
It's still rather hacky, and it does nothing to reduce the complexity of
the current approach of weaving between user IDs, but perhaps it can serve
as a stopgap solution.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachments:

  v2-0001-Ensure-privilege-checks-in-CREATE-INDEX-run-as-ca.patch (text/x-diff, 0B) download

view thread (21+ messages)  latest in thread

Message-ID: <20220531152855.GA2236210@nathanxps13>
Permalink:  ../20220531152855.GA2236210@nathanxps13/
Also on:    postgresql.org/message-id/20220531152855.GA2236210@nathanxps13

 ·  · 

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-bugs@postgresql.org
  Cc: nathandbossart@gmail.com, michael@paquier.xyz, noah@leadboat.com, Franz-Josef.Faerber@stmuk.bayern.de, tgl@sss.pgh.pa.us
  Subject: Re: Extension pg_trgm, permissions and pg_dump order
  In-Reply-To: <20220531152855.GA2236210@nathanxps13>
  References: <f8a4105f076544c180a87ef0c4822352@stmuk.bayern.de> <1961551.1653498155@sss.pgh.pa.us> <20220526055047.GA3153526@rfd.leadboat.com> <20220528045122.GA3228881@rfd.leadboat.com> <20220529033033.GA1973706@nathanxps13> <20220529043403.GB3265235@rfd.leadboat.com> <YpWZ02YEN9pipA6M@paquier.xyz> <20220531152855.GA2236210@nathanxps13>

* 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