| From: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com> |
|---|---|
| To: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
| Cc: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
| Subject: | RE: Remove duplicate table scan in logical apply worker and code refactoring |
| Date: | 2024-07-31 11:21:23 |
| Message-ID: | OS0PR01MB571684D8C9150AA1A125147094B12@OS0PR01MB5716.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wednesday, July 31, 2024 5:07 PM Kuroda, Hayato/黒田 隼人 <kuroda(dot)hayato(at)fujitsu(dot)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 | Content-Type | Size |
|---|---|---|
| v2-0001-avoid-duplicate-table-scan-for-cross-partition-up.patch | application/octet-stream | 2.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ajin Cherian | 2024-07-31 11:24:06 | Re: Conflict Detection and Resolution |
| Previous Message | Alexander Lakhin | 2024-07-31 11:00:00 | The stats.sql test is failing sporadically in v14- on POWER7/AIX 7.1 buildfarm animals |