Re: Conflict detection for update_deleted in logical replication

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Conflict detection for update_deleted in logical replication
Date: 2025-01-07 08:49:37
Message-ID: CAA4eK1J8uJOn0R3=VZJkwsdcwVTiRzNPskmyiWjhYdAkb+ckPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 3, 2025 at 11:22 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> 5.
> +
> + <varlistentry
> id="sql-createsubscription-params-with-detect-update-deleted">
> + <term><literal>detect_update_deleted</literal>
> (<type>boolean</type>)</term>
> + <listitem>
> + <para>
> + Specifies whether the detection of <xref
> linkend="conflict-update-deleted"/>
> + is enabled. The default is <literal>false</literal>. If set to
> + true, the dead tuples on the subscriber that are still useful for
> + detecting <xref linkend="conflict-update-deleted"/>
> + are retained,
>
> One of the purposes of retaining dead tuples is to detect
> update_delete conflict. But, I also see the following in 0001's commit
> message: "Since the mechanism relies on a single replication slot, it
> not only assists in retaining dead tuples but also preserves commit
> timestamps and origin data. These information will be displayed in the
> additional logs generated for logical replication conflicts.
> Furthermore, the preserved commit timestamps and origin data are
> essential for consistently detecting update_origin_differs conflicts."
> which indicates there are other cases where retaining dead tuples can
> help. So, I was thinking about whether to name this new option as
> retain_dead_tuples or something along those lines?
>

The other possible option name could be retain_conflict_info.
Sawada-San, and others, do you have any preference for the name of
this option?

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-01-07 08:54:59 Re: per backend I/O statistics
Previous Message Bertrand Drouvot 2025-01-07 08:48:51 per backend WAL statistics