Re: Proposal: Conflict log history table for Logical Replication
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: shveta malik <shveta.malik@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, vignesh C <vignesh21@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: 2026-01-28T20:59:45Z
Lists: pgsql-hackers
On Wed, Jan 28, 2026 at 11:04 PM shveta malik <shveta.malik@gmail.com> wrote:
>
> patch0002:
>
...
>
> 3)
> This is defined in conflict.h:
>
> +/* The single source of truth for the conflict log table schema */
> +static const ConflictLogColumnDef ConflictLogSchema[] =
> +{
> ....
> + { .attname = "local_conflicts", .atttypid = JSONARRAYOID }
> +};
>
> while its element 'local_conflicts' is defined in conflict.c:
>
> +/* Schema for the elements within the 'local_conflicts' JSON array */
> +static const ConflictLogColumnDef LocalConflictSchema[] =
> +{
> ...
> +};
>
> It takes some time to figure this part out as a reader of code. I
> think we shall define LocalConflictSchema schema immediately after
> ConflictLogSchema for anyone to understand it better, unless there is
> something blocking it?
>
+1.
I had asked for this same change last year [1 - #17]
======
[1] https://www.postgresql.org/message-id/CAHut%2BPtSggpJH36YOwdfmY5gU6yr7Wa-%3Dreht4c2v%2Bn8FYUKJg%40mail.gmail.com
Kind Regards,
Peter Smith.
Fujitsu Australia
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