pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Euler Taveira <euler@eulerto.com>
Cc: Kong Man <kong_mansatiansin@hotmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: pg_restore 14 skips ACL COLUMN when --schema is used
Date: Wed, 02 Aug 2023 16:06:47 -0400
Message-ID: <3317367.1691006807@sss.pgh.pa.us> (raw)
In-Reply-To: <90659bbc-e0cb-407d-b42b-5931346735ad@app.fastmail.com>
References: <DM4PR11MB73976902DBBA10B1D652F9498B06A@DM4PR11MB7397.namprd11.prod.outlook.com>
	<2427882.1690590240@sss.pgh.pa.us>
	<DM4PR11MB7397E0F1BFD8A839199B59838B05A@DM4PR11MB7397.namprd11.prod.outlook.com>
	<DM4PR11MB73970D090F35B7E1C2EEEB108B05A@DM4PR11MB7397.namprd11.prod.outlook.com>
	<90659bbc-e0cb-407d-b42b-5931346735ad@app.fastmail.com>

"Euler Taveira" <euler@eulerto.com> writes:
> You didn't provide a test case as requested but I investigated this issue
> according to your description. The following commands is sufficient to produce
> the analysis below.

Thanks for looking into it!  The ingredient I missed while studying this
earlier is that the table must have *both* table-level and column-level
ACLs to provoke the issue.

> It means that an ACL for columns has 2 dependencies (nDeps = 2) the function
> _tocEntryRequired() returns 0 (see code below).

D'oh.  I think this code was correct when written, but we added an extra
dependency from column ACL to table ACL later because restoring them in
the wrong order causes problems.

> The discussion [1] in the commit 0d4e6ed3085 does not explain if the 'if' logic
> covers all cases. It certainly doesn't for the OP case. The only (hackish)
> suggestion I have ATM is to detect ACL for columns and returns 1.

Yeah, ignoring dependencies on ACLs in this logic seems like the best
way forward.  Do you want to write a patch?

			regards, tom lane





view thread (11+ messages)  latest in thread

Message-ID: <3317367.1691006807@sss.pgh.pa.us>
Permalink:  ../3317367.1691006807@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3317367.1691006807@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, euler@eulerto.com, kong_mansatiansin@hotmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: pg_restore 14 skips ACL COLUMN when --schema is used
  In-Reply-To: <3317367.1691006807@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