Re: Dump public schema ownership & seclabels

From: Noah Misch <noah(at)leadboat(dot)com>
To: Asif Rehman <asifr(dot)rehman(at)gmail(dot)com>, Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Dump public schema ownership & seclabels
Date: 2021-05-03 05:57:47
Message-ID: 20210503055747.GA2788582@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, May 01, 2021 at 09:43:36AM -0700, Zhihong Yu wrote:
> On Sat, May 1, 2021 at 8:16 AM Asif Rehman <asifr(dot)rehman(at)gmail(dot)com> wrote:
> > The following review has been posted through the commitfest application:
> > make installcheck-world: tested, passed
> > Implements feature: tested, passed
> > Spec compliant: tested, passed
> > Documentation: not tested
> >
> > Hi,
> >
> > I have tested this patch. This patch still applies and it works well.
> >
> > Regards,
> > Asif
> >
> > The new status of this patch is: Ready for Committer

Thanks. Later, I saw that "pg_dump --schema=public" traditionally has yielded
"CREATE SCHEMA public" and "COMMENT ON SCHEMA public". I've updated the
patches to preserve that behavior.

I'll push this when v15 branches. I do think it's a bug fix and could argue
for including it in v14. On the other hand, I mailed three total patch
versions now known to be wrong, so it would be imprudent to count on no
surprises remaining.

> For public-schema-comment-dump-v2.patch :
>
> + if (ncomments == 0)
> + {
> + comments = &empty_comment;
> + ncomments = 1;
> + }
> + else if (strcmp(comments->descr, (fout->remoteVersion >= 80300 ?
> + "standard public schema" :
> + "Standard public schema")) == 0)
> + {
> + ncomments = 0;
>
> Is it possible that, in the case ncomments > 0, there are more than one
> comment ?

Yes, I think that's normal when the search terms include an objsubid (subid !=
InvalidOid).

Attachment Content-Type Size
public-owner-dump-v3.patch text/plain 21.0 KB
public-schema-comment-dump-v3.patch text/plain 7.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-05-03 06:29:32 Re: Logical Replication - behavior of TRUNCATE ... CASCADE
Previous Message Thomas Munro 2021-05-03 05:42:35 Re: WIP: WAL prefetch (another approach)