Re: Add an option to skip loading missing publication to avoid logical replication failure - Mailing list pgsql-hackers

From vignesh C
Subject Re: Add an option to skip loading missing publication to avoid logical replication failure
Date
Msg-id CALDaNm1Lg1YOtY+Sy2his=ikHsQYYQ1pWN620QiBZDBdbsjMHw@mail.gmail.com
Whole thread Raw
In response to Re: Add an option to skip loading missing publication to avoid logical replication failure  (vignesh C <vignesh21@gmail.com>)
Responses Re: Add an option to skip loading missing publication to avoid logical replication failure
List pgsql-hackers
On Tue, 25 Feb 2025 at 15:32, vignesh C <vignesh21@gmail.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

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: bug when apply fast default mechanism for adding new column over domain with default value
Next
From: Benoit Lobréau
Date:
Subject: Re: long-standing data loss bug in initial sync of logical replication