RE: Remove duplicate table scan in logical apply worker and code refactoring - Mailing list pgsql-hackers

From Zhijie Hou (Fujitsu)
Subject RE: Remove duplicate table scan in logical apply worker and code refactoring
Date
Msg-id OS0PR01MB571684D8C9150AA1A125147094B12@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
In response to RE: Remove duplicate table scan in logical apply worker and code refactoring  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses RE: Remove duplicate table scan in logical apply worker and code refactoring
List pgsql-hackers
On Wednesday, July 31, 2024 5:07 PM Kuroda, Hayato/黒田 隼人 <kuroda.hayato@fujitsu.com> wrote:
>
> Dear Hou,
>
> > When reviewing the code in logical/worker.c, I noticed that when
> > applying a cross-partition update action, it scans the old partition twice.
> > I am attaching the patch 0001 to remove this duplicate table scan.
>
> Just to clarify, you meant that FindReplTupleInLocalRel() are called in
> apply_handle_tuple_routing() and
> apply_handle_tuple_routing()->apply_handle_delete_internal(),
> which requires the index or sequential scan, right? LGTM.

Thanks for reviewing the patch, and your understanding is correct.

Here is the updated patch 0001. I removed the comments as suggested by Amit.

Since 0002 patch is only refactoring the code and I need some time to review
the comments for it, I will hold it until the 0001 is committed.

Best Regards,
Hou zj

Attachment

pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: The stats.sql test is failing sporadically in v14- on POWER7/AIX 7.1 buildfarm animals
Next
From: Ajin Cherian
Date:
Subject: Re: Conflict Detection and Resolution