Re: Proposal: Conflict log history table for Logical Replication

shveta malik <shveta.malik@gmail.com>

From: shveta malik <shveta.malik@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, vignesh C <vignesh21@gmail.com>, Nisha Moond <nisha.moond412@gmail.com>, Peter Smith <smithpb2250@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, shveta malik <shveta.malik@gmail.com>
Date: 2026-05-04T05:48:37Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Allow logical replication conflicts to be logged to a table.

  2. Avoid orphaned objects dependencies

On Sat, May 2, 2026 at 2:40 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
> On Fri, May 1, 2026 at 7:16 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> >
> > 4. pg_conflict is the catalog schema and as Nisha reported,
> > non-superusers aren't allowed to access the objects within it. Because
> > of this, SELECT, DELETE, and TRUNCATE are disallowed even for the
> > subscription owner if that owner is a non-superuser. I am working on
> > the fix.
>
> While analyzing this, I realized that the schema ACL check happens
> very early in analyze phase [1]. I'm not sure if we can bypass the
> subscription owner from this check at that stage without implementing
> a hacky solution.  Another option is to remove restrictions from the
> pg_conflict schema for all users and keep only table-level
> restrictions within that schema. I am exploring how to implement this.

Dilip, instead of granting permission (or removing restrictions) on
the pg_conflict schema to all users, is there a way to grant USAGE on
the schema only to the subscription owner when the conflict log table
is created and when the owner is altered for the subscription? I think
it should resolve the problem in a better way. Thoughts?  Let me know
if I am missing something.


thanks
Shveta