Re: Proposal: Conflict log history table for Logical Replication

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, shveta malik <shveta(dot)malik(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 <shvetamalik(at)gmail(dot)com>
Subject: Re: Proposal: Conflict log history table for Logical Replication
Date: 2026-06-02 10:52:30
Message-ID: CAA4eK1+944nnGZA+zVEVqmsFqbg3Hp9n6W6mT9qKGD-pt3R-AA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 2, 2026 at 1:12 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> I've been thinking more about this new option:
> conflict_log_destination (enum) = 'log' or 'table' or 'all'.
>
> I think it behaves more like a bitmap than an enum. Also, having 'all'
> as an enum value seems odd to me. IMO, this new option is actually
> more similar to the 'publish' option from CREATE PUBLICATION.
>
> I suggest it might be better to implement this as a *string* option:
> conflict_log_destination (string), and has allowed values of 'log' and 'table'.
>
> e.g.
> conflict_log_destination = 'log'
> conflict_log_destination = 'table'
> conflict_log_destination = 'log, table'
>
> Apart from being more intuitive and readable, this way is also
> future-proof in case some 3rd/4th/etc way of logging is invented --
> e.g. the user can define whatever combinations they want instead of
> being stuck with only "all".
>

I think if we support other formats where conflict logs can be stored
then 'all' will be more relevant as instead of typing all the formats
individually users can use 'all'. Also, we should be able to extend
this option to multi-value if required in future, so the current
proposal seems reasonable to me.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2026-06-02 11:02:13 Re: [Bug]Assertion failure in LATERAL GRAPH_TABLE with multi-label pattern
Previous Message Andy Fan 2026-06-02 10:25:35 Re: Make printtup a bit faster