RE: Remove duplicate table scan in logical apply worker and code refactoring

Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>

From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Amit Kapila <amit.kapila16@gmail.com>
Date: 2024-08-01T01:59:11Z
Lists: pgsql-hackers

Attachments

Dear Hou,

> 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.

Thanks for updating the patch. I did a performance testing with v2-0001.

Before:	15.553 [s]
After:	7.593 [s]

I used the attached script for setting up. I used almost the same setting and synchronous
replication is used.

[machine]
CPU(s):                120
Model name:            Intel(R) Xeon(R) CPU E7-4890 v2 @ 2.80GHz
Core(s) per socket:    15
Socket(s):             4

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Commits

  1. Avoid duplicate table scans for cross-partition updates during logical replication.