Re: Preserve conflict log table during upgrade

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>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Preserve conflict log table during upgrade
Date: 2026-12-01 04:24:41
Message-ID: CAFiTN-vkMpzVWcaCURC6NxNEA0WWsXhPe50yjctdBoo21wJ-aA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 30, 2026 at 4:07 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Mon, 30 Nov 2026 at 15:23, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Fri, Nov 27, 2026 at 6:26 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> > >
> > > The attached v2 version patch has the changes for the same.
> > >
> >
> > Pushed 0001, kindly rebase and send the remaining patch.
>
> Here is a rebased version, the v3 version patch also addresses Ajin's
> comments from [1] and Kuroda-san's comments from [2].
> [1] - https://www.postgresql.org/message-id/CAFPTHDZkvegyxt_P%3DtYqjKmUNHhRcGcgvQ-rE7oFr%3Dx2qCPtxQ%40mail.gmail.com
> [2] - https://www.postgresql.org/message-id/OS7PR01MB18317D4778448CA0BE8AE2B2CF54E2%40OS7PR01MB18317.jpnprd01.prod.outlook.com
>

Started reading the patch, I haven't yet done the complete logic
review but plan to complete by today, some minor comments

1.
+# A comment on the table must survive the upgrade too.
+my $sub_clt_col = $old_sub->safe_psql('postgres',
+ "SELECT attname FROM pg_attribute WHERE attrelid = $sub_clt_relid
AND attnum = 1"
+);

sub_clt_col seems to be unused.

2. The note in v2's documentation was removed in v3; is this intentional?

+++ b/doc/src/sgml/logical-replication.sgml
@@ -3159,7 +3159,11 @@ CONTEXT: processing remote data for
replication origin "pg_16395" during "INSER

<para>
<application>pg_upgrade</application> also preserves the OID of every
- subscription.
+ subscription. If
+ <link linkend="sql-createsubscription-params-with-conflict-log-destination"><literal>conflict_log_destination</literal></link>
+ is set to <literal>table</literal> or <literal>all</literal>, the
subscription's
+ <link linkend="logical-replication-conflict-table-based-logging">conflict
log table</link>
+ is preserved as well.
</para>

--
Regards,
Dilip Kumar
Google

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-12-01 04:25:10 Re: Preserve conflict log table during upgrade
Previous Message Ideriha, Takeshi 2026-12-01 04:07:33 Unused code in brin_minmax_multi_consistent