From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_restore --no-policies should not restore policies' comment |
Date: | 2025-07-02 02:17:09 |
Message-ID: | CACJufxEyDdvyt9_GZvswDsSD0XBioj-vEeMiGrSFMHM746c2uA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jun 27, 2025 at 1:34 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>
> > To do that, we need
> > 1. we checked that COMMENTS on policies, the TocEntry->tag begins with
> > "POLICY". which is true, see above code walk through.
> > 2. We also need to make sure that no other dumpComment call results in a
> > COMMENT command whose TocEntry->tag also starts with "POLICY".
> > which is also true, per https://www.postgresql.org/docs/current/sql-comment.html
> > after "COMMENT ON", the next word is fixed, and "POLICY" only occurs once.
> >
> >
> > If this is what we want, we can do the same for
> > "--no-publications", "--no-subscriptions" too.
>
> Agreed.
>
hi.
I’ve tested the pg_restore options --no-policies, --no-publications, and
--no-subscriptions locally.
However, I haven’t tested --no-security-labels option, so no changes were
made for it. Testing --no-security-labels appears to need more setup, which
didn’t seem trivial.
writing Perl tests is not easier for me, I didn’t add those either.
(seems in master, we didn't have --no-publications, --no-subscriptions
tests too)
Attachment | Content-Type | Size |
---|---|---|
v2-0001-pg_restore-not-restore-comments-when-it-s-object-not-rest.patch | text/x-patch | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Japin Li | 2025-07-02 02:20:50 | Re: Making pg_rewind faster |
Previous Message | Richard Guo | 2025-07-02 02:08:01 | Re: Memoize ANTI and SEMI JOIN inner |