Re: Proposal: Conflict log history table for Logical Replication

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(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 <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Proposal: Conflict log history table for Logical Replication
Date: 2026-04-27 09:38:06
Message-ID: CAJpy0uC8=4jJrJUN43zUgc2yaxp=TspgfUtj=-+AyALaE7fBXg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Few comments on 001 alone:

1)
postgres=# create publication pub1 for all tables except (table temp_table);
ERROR: cannot specify relation "temp_table" in the publication EXCEPT clause
DETAIL: This operation is not supported for temporary tables.

postgres=# create publication pub1 for all tables except (table
pg_conflict.pg_conflict_16395);
ERROR: cannot add relation "pg_conflict.pg_conflict_16395" to publication
DETAIL: This operation is not supported for conflict log tables.

We shall change the error message for CLT in alignement with new
EXCEPT error message added recently.

2)
\dRs+
List of subscriptions

Name | .... Conflict log destination | Conflict log table
sub1 | table | pg_conflict_16395

I know we discussed earlier whether to qualify the CLT with the schema
name in the above output, and one of us suggested it was not needed.
But on revisiting this thread, I wonder if including the
schema-qualified name would be useful, as it makes it easier for users
to refer to it quickly when needed. It took me a while to recall the
schema name here.

3)
Also I would like to know which one is better here:

\dRs+ giving 'Conflict log table' in tabular format (current way)

Or giving it as 'Conflict log table' at the end, like:

Conflict Log Table:
"pg_conflict.pg_conflict_16395"

I’m slightly inclined toward option 2, similar to how \dRp shows
“Tables” and “Except tables” at the end; it catches the eye faster.
But I don't have a strong opinion here. I'd be interested to hear what
others think.

4)
When we create CLT during create-sub or alter-sub, can we please log
it to logile, something like:
LOG: created conflict log table "pg_conflict.pg_conflict_16395" for
subscription "sub1"

thanks
Shveta

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-04-27 09:40:15 Re: Inconsistent trigger behavior between two temporal leftovers
Previous Message Peter Eisentraut 2026-04-27 09:02:32 Re: Add psql tab completion support for FOR PORTION OF