Re: pg_restore 14 skips ACL COLUMN when --schema is used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Euler Taveira" <euler(at)eulerto(dot)com>
Cc: "Kong Man" <kong_mansatiansin(at)hotmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_restore 14 skips ACL COLUMN when --schema is used
Date: 2023-08-09 13:39:20
Message-ID: 87065.1691588360@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Euler Taveira" <euler(at)eulerto(dot)com> writes:
> On Wed, Aug 2, 2023, at 5:53 PM, Euler Taveira wrote:
>> On Wed, Aug 2, 2023, at 5:06 PM, Tom Lane wrote:
>>> Yeah, ignoring dependencies on ACLs in this logic seems like the best
>>> way forward. Do you want to write a patch?

>> I like your suggestion. Let me give it a try.

Hmm, changing it like that seems likely to have a lot of unexpected
side-effects. What I had in mind was to change the

if (te->nDeps != 1 ||
TocIDRequired(AH, te->dependencies[0]) == 0)
return 0;

bit so that it would loop through the TE's dependencies to see
if any one of them is a required non-ACL TE. We have to relax
the "te->nDeps != 1" restriction, but we still want to check
that there is a parent object that is being restored.

Some work on the associated comment block seems appropriate too.
And maybe add a test case?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nicolas Gouteux 2023-08-09 14:04:42 Re: BUG #18051: char(N) and varchar(N) behave opposite to the documentation
Previous Message David G. Johnston 2023-08-09 12:57:36 Re: BUG #18051: char(N) and varchar(N) behave opposite to the documentation