Re: pg_restore 14 skips ACL COLUMN when --schema is used - Mailing list pgsql-bugs

From Tom Lane
Subject Re: pg_restore 14 skips ACL COLUMN when --schema is used
Date
Msg-id 3317367.1691006807@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore 14 skips ACL COLUMN when --schema is used  ("Euler Taveira" <euler@eulerto.com>)
Responses Re: pg_restore 14 skips ACL COLUMN when --schema is used
List pgsql-bugs
"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



pgsql-bugs by date:

Previous
From: "Euler Taveira"
Date:
Subject: Re: pg_restore 14 skips ACL COLUMN when --schema is used
Next
From: "Euler Taveira"
Date:
Subject: Re: pg_restore 14 skips ACL COLUMN when --schema is used