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

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 01:31:57
Message-ID: ece8667d-9824-4740-a150-617c9b3d9284@app.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

This patch should apply on all supported back branches (11-16).

In my previous email I forgot the --schema option in the pg_restore. The
correct steps are:

pg_dump -Fc -f /u/d.dump -d test
pg_restore -l /u/d.dump > /u/d.toc
pg_restore --schema=public --use-list=<(grep "ACL" /u/d.toc) -f - /u/d.dump

--
Euler Taveira
EDB https://www.enterprisedb.com/

Attachment Content-Type Size
v1-0001-Fix-column-level-ACL-for-selective-restore.patch text/x-patch 1.5 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-08-09 08:55:53 BUG #18051: char(N) and varchar(N) behave opposite to the documentation
Previous Message Michael Paquier 2023-08-08 00:31:40 Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index