Re: Proposal: Conflict log history table for Logical Replication - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Proposal: Conflict log history table for Logical Replication
Date
Msg-id CAA4eK1JA9tmKgEQFC_Xq-_hh7_2NC1sFbfLOY91UbzZWP8cSVg@mail.gmail.com
Whole thread
In response to Re: Proposal: Conflict log history table for Logical Replication  (Dilip Kumar <dilipbalaut@gmail.com>)
Responses Re: Proposal: Conflict log history table for Logical Replication
List pgsql-hackers
On Sun, Oct 4, 2026 at 2:01 AM Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
> Here is the failed test case
>
>  -- On Publisher:
>     CREATE TABLE tab_temporal (
>         id int4range,
>         valid_at datemultirange,
>         PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
>     );
>     INSERT INTO tab_temporal VALUES ('[1,2)', '{[2020-01-01,2021-01-01)}');
>     CREATE PUBLICATION pub_temporal FOR TABLE tab_temporal;
>
>     -- On Subscriber:
>     CREATE TABLE tab_temporal (
>         id int4range,
>         valid_at datemultirange,
>         PRIMARY KEY (id, valid_at WITHOUT OVERLAPS)
>     );
>     CREATE SUBSCRIPTION sub_temporal
>         CONNECTION '...'
>         PUBLICATION pub_temporal
>         WITH (conflict_log_destination = 'table');
>
>     -- After initial sync, delete the row locally on the subscriber:
>     DELETE FROM tab_temporal;
>
>     -- Then delete the row on the publisher to trigger a
> delete_missing conflict:
>     DELETE FROM tab_temporal;
>
> And without fix shared as a v77-0003 [1], this would error out with
> below error[2], I have explained the reason [1].
>

Okay, I see the problem but I wonder why you didn't consider using
rd_opcintype stored in index relation to solve this problem. I have
tried the attached atop v79-0001 and v79-0002, manually executed the
test you shared in this email and it fixed the issue for me.

--
With Regards,
Amit Kapila.

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: [PATCH] Add memory/disk usage for Function Scan nodes in EXPLAIN
Next
From: Jacob Champion
Date:
Subject: Re: Do we want to solve reload/config races more generally? (was: Postmaster crashes on SIGHUP when oauth_validator_libraries holds only whitespace)