From: | vignesh C <vignesh21(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Add an option to skip loading missing publication to avoid logical replication failure |
Date: | 2025-03-03 09:00:16 |
Message-ID: | CALDaNm1Lg1YOtY+Sy2his=ikHsQYYQ1pWN620QiBZDBdbsjMHw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 25 Feb 2025 at 15:32, vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> The attached script has the script that was used for testing. Here the
> NUM_RECORDS count should be changed accordingly for each of the tests
> and while running the test with the patch change uncomment the drop
> publication command.
I have done further analysis on the test and changed the test to
compare it better with HEAD. The execution time is in milliseconds.
Brach/records | 100 | 1000 | 10000 | 100000 | 1000000
Head | 10.43 | 15.86 | 64.44 | 550.56 | 8991.04
Patch | 11.35 | 17.26 | 73.50 | 640.21 | 10104.72
% diff | -8.82 | -8.85 | -14.08 | -16.28 | -12.38
There is a performance degradation in the range of 8.8 to 16.2 percent.
Test Details (With Head):
a) Create two publications for the same table. b) Insert the records
listed in the table below. c) Use pg_recvlogical to capture the
changes.
Test Details (With Patch):
a) Create two publications for the same table.b) Drop one
publication(to check the impact of skip missing publication), ensuring
that changes from the remaining publication continue to be captured.
c) Insert the records listed in the table below.d) Use pg_recvlogical
to capture the changes.
The performance degradation is in the range of 8.8 to 16.2
percentage.The script used for the testing is attached, while running
with patch the drop publication command in script should be
uncommented and the record count should be changed for each of the
run. Also I changed the patch so that we need not execute the
get_rel_sync_entry code flow for every record in case of missing
publication case and to do so only in case when the publications have
changed. The attached v4 version patch has the changes for the same.
Regards,
Vignesh
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Fix-logical-replication-breakage-after.patch | application/octet-stream | 5.2 KB |
test_pg_recvlogical.sh | text/x-sh | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Benoit Lobréau | 2025-03-03 09:03:44 | Re: long-standing data loss bug in initial sync of logical replication |
Previous Message | jian he | 2025-03-03 08:45:21 | Re: bug when apply fast default mechanism for adding new column over domain with default value |