| From: | vignesh C <vignesh21(at)gmail(dot)com> |
|---|---|
| To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
| Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shvetamalik(at)gmail(dot)com> |
| Subject: | Re: Preserve conflict log table during upgrade |
| Date: | 2026-12-02 02:27:40 |
| Message-ID: | CALDaNm0J9Am7JM0asUH+eeVzh0dWhnbwmbJak=2AtqDK5rwfaQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, 1 Dec 2026 at 17:38, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> I reviewed v4, the core design looks fine, and I only have some
> comments in below code
>
> > @@ -1999,6 +2010,24 @@ selectDumpableNamespace(NamespaceInfo *nsinfo, Archive *fout)
> > + else if (strcmp(nsinfo->dobj.name, "pg_conflict") == 0)
> > + {
> > + if (fout->dopt->binary_upgrade)
> > + {
> > + nsinfo->dobj.dump = DUMP_COMPONENT_ACL;
> > + nsinfo->dobj.dump_contains = DUMP_COMPONENT_ALL;
> > + }
> > + else
> > + nsinfo->dobj.dump_contains = nsinfo->dobj.dump = DUMP_COMPONENT_NONE;
> > + }
>
> When pg_dump is invoked with --binary-upgrade --no-subscriptions,
> getSubscriptions() bail out early, but selectDumpableNamespace() still
> marks pg_conflict's contents as DUMP_COMPONENT_ALL. As a result,
> pg_dump still issues LOCK TABLE pg_conflict.pg_conflict_log_<oid> IN
> ACCESS SHARE MODE and fetches their metadata/ACLs/comments/stats, only
> for _tocEntryRequired() to discard those TOC entries afterward. Shall
> we change that?
Yes, no need to do the additional processing for the entries that will
never be dumped, here is a v5 version patch including the changes for
the same.
Regards,
Vignesh
| Attachment | Content-Type | Size |
|---|---|---|
| v5-0001-Preserve-conflict-log-tables-and-conflict_log_des.patch | application/octet-stream | 23.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ideriha, Takeshi | 2026-12-02 02:44:42 | Re: [PATCH] pgcrypto: Fix sha-crypt rounds= values that do not fit in int (BUG #19743) |
| Previous Message | Zhijie Hou | 2026-12-02 02:20:19 | Re: Fix race between copying and dropping a replication slot |