Re: Proposal: Conflict log history table for Logical Replication
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Peter Smith <smithpb2250@gmail.com>
Cc: shveta malik <shveta.malik@gmail.com>,
Amit Kapila <amit.kapila16@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-25T08:29:08Z
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 →
-
Allow logical replication conflicts to be logged to a table.
- a5918fddf10d master landed
-
Avoid orphaned objects dependencies
- 2fbb21170e90 19 (unreleased) cited
On Tue, Nov 25, 2025 at 9:03 AM Peter Smith <smithpb2250@gmail.com> wrote: > > Hi Dilip. > > Here are a couple of review comments for v6-0001. > > ====== > GENERAL. > > 1. > Firstly, here is one of my "what if" ideas... > > The current patch is described as making a "structured, queryable > record of all logical replication conflicts". > > What if we go bigger than that? What if this were made a more generic > "structured, queryable record of logical replication activity"? > > AFAIK, there don't have to be too many logic changes to achieve this. > e.g. I'm imagining it is mostly: > > * Rename the subscription parameter "conflict_log_table" to > "log_table" or similar. > * Remove/modify the "conflict_" name part from many of the variables > and function names. > * Add another 'type' column to the log table -- e.g. everything this > patch writes can be type="CONFL", or type='c', or whatever. > * Maybe tweak/add some of the other columns for more generic future use > > Anyway, it might be worth considering this now, before everything > becomes set in stone with a conflict-only focus, making it too > difficult to add more potential/unknown log table enhancements later. > > Thoughts? Yeah that's an interesting thought for sure, but honestly I believe the conflict log table only for storing the conflict and conflict resolution related data is standard followed across the databases who provide active-active setup e.g. Oracle Golden Gate, BDR, pg active, so IMHO to keep the feature clean and focused, we should follow the same. I will work on other review comments and post the patch soon. -- Regards, Dilip Kumar Google