Re: Proposal: Conflict log history table for Logical Replication

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Zhijie Hou <houzhijie22(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, saurabh singh <saurabh(dot)singh214(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shvetamalik(at)gmail(dot)com>
Subject: Re: Proposal: Conflict log history table for Logical Replication
Date: 2026-11-26 11:28:33
Message-ID: CAA4eK1+z29LbhwRqJy9KXV+1s2a7hkqq5MGX1WYvcQ=wkkpK=Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 26, 2026 at 1:21 PM Zhijie Hou <houzhijie22(at)gmail(dot)com> wrote:
>
> I reviewed 0002 and have few comments:
>
> 1.
>
> The ACLs on the pg_conflict schema are not preserved during upgrade, so
> a user whose access to pg_conflict.* was revoked can unexpectedly access
> it again after upgrading. I think we shall update
> selectDumpableNamespace() so that pg_conflict falls into the pg_catalog
> branch to preserve them.
>

I am wondering why we need this special handling in
selectDumpableTable at all for CLT? Can't the following handles both
your and current cases by having a branch as follows in
selectDumpableNamespace()
else if (strcmp(nsinfo->dobj.name, “pg_conflict”) == 0)
{
nsinfo->dobj.dump = DUMP_COMPONENT_ACL;
nsinfo->dobj.dump_contains = fout->dopt->binary_upgrade ?
DUMP_COMPONENT_ALL : DUMP_COMPONENT_NONE;
}

Will it be better if we split this patch to preserve subid across
upgrade into a separate patch as that would be required for commit_ts
upgrade as well? And start a separate thread to preserve CLT during
upgrade (that thread can contain both preserve subid patch and CLT vs.
dump/upgrade handling).

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Artur Zakirov 2026-11-26 11:41:15 Add mention of REPACK CONCURRENTLY to Explicit Locking docs
Previous Message Peter Eisentraut 2026-11-26 10:50:34 Re: Add counted_by attribute