| From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
|---|---|
| To: | vignesh C <vignesh21(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-01 12:07:50 |
| Message-ID: | CAFiTN-vNRjndjMQiiS_nXGKiaNuoUfM-pZz4MkFvQ7zkVk865g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Dec 1, 2026 at 4:31 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Tue, 1 Dec 2026 at 12:24, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > >
> > > I verified a bit more. Once concern:
> > >
> > > $ ./pg_dump -d postgres -t pg_conflict.pg_conflict_log_16390 -p 5434
> > > pg_dump: error: no matching tables were found
> > >
> >
> > +1 for docs change. I think there is no use dumping the CLT table in
> > non-binary upgrade mode (aka outside pg_upgrade) as we won't be able
> > maintain the subscription's OID and anyway we won't allow any DDL
> > operations on such tables.
>
> That seems the better option here.
>
> > See attached, this contains some other
> > cosmetic changes like removing the is_conflict_log_table() as it is
> > used at one place and changing comments at few places.
>
> Thanks for the changes, I have merged your changes into the v4 version
> patch attached.
>
> The patch also adds documentation for the issues reported by Shlok at
> [1] at [2].
> [1] - https://www.postgresql.org/message-id/CANhcyEVOZ6YpFDFdb%3Df3Q407ubQRE5U4_uc_QjzC_ys3LpVcDA%40mail.gmail.com
> [2] - https://www.postgresql.org/message-id/CANhcyEVfZE%3D0JfhZ%3DJqLNuzXSzyqpTz2q2v_yXuO9RLyNoisoQ%40mail.gmail.com
>
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?
--
Regards,
Dilip Kumar
Google
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zhijie Hou | 2026-12-01 12:35:43 | Re: REPACK (CONCURRENTLY) fails during parallel build of exclusion constraint indexes |
| Previous Message | Ilia Evdokimov | 2026-12-01 12:05:27 | Re: Optimize MCV stats for sortable types and utilize sorted-order properties |