Re: Conflict detection and logging in logical replication

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Jan Wieck <jan(at)wi3ck(dot)info>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Conflict detection and logging in logical replication
Date: 2024-07-30 09:06:24
Message-ID: CAJpy0uB8OXi6C9QZS2u4dkVFpWi2BAwQJCs3GYwBtB4f4K4noA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 29, 2024 at 11:44 AM Zhijie Hou (Fujitsu)
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> Here is the V7 patch set that addressed all the comments so far[1][2][3].

Thanks for the patch, few comments:

1)
build_index_value_desc()
/* Assume the index has been locked */
indexDesc = index_open(indexoid, NoLock);

-- Comment is not very informative. Can we explain in the header if
the caller is supposed to lock it?

2)
apply_handle_delete_internal()

--Do we need to check "(!edata->mtstate || edata->mtstate->operation
!= CMD_UPDATE)" in the else part as well? Can there be a scenario
where during update flow, it is trying to delete from a partition and
comes here, but till then that row is deleted already and we end up
raising 'delete_missing' additionally instead of 'update_missing'
alone?

3)
errdetail_apply_conflict(): Bulid the index value string.
-- Bulid->Build

4)
patch003: create_subscription.sgml
the conflict statistics are collected(displayed in the

-- collected (displayed in the -->space before '(' is needed.

thanks
Shveta

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2024-07-30 09:06:29 Re: Is *fast* 32-bit support still important?
Previous Message Tomas Vondra 2024-07-30 09:05:56 Re: WIP: parallel GiST index builds