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

From Amit Kapila
Subject Re: Add an option to skip loading missing publication to avoid logical replication failure
Date
Msg-id CAA4eK1+37NhZg+q_UdX6Bfm1ikfoZPZaS0nqPY6xtMNs4BPQnw@mail.gmail.com
Whole thread Raw
In response to Add an option to skip loading missing publication to avoid logical replication failure  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
On Tue, Feb 18, 2025 at 2:24 PM vignesh C <vignesh21@gmail.com> wrote:
>
> On Fri, 14 Feb 2025 at 15:36, Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > Did you try to measure the performance impact of this change? We can
> > try a few cases where DDL and DMLs are involved, missing publication
> > (drop publication and recreate after a varying number of records to
> > check the impact).
>
> Since we don't have an exact scenario to compare with the patch
> (because, in the current HEAD, when the publication is missing, an
> error is thrown and the walsender/worker restarts), I compared the
> positive case, where records are successfully replicated to the
> subscriber, as shown below. For the scenario with the patch, I ran the
> same test, where the publication is dropped before the insert,
> allowing the walsender to check whether the publication is present.
> The test results, which represent the median of 7 runs and the
> execution run is in milliseconds, are provided below:
>
> Brach/records  |  100     |  1000   |  10000     |  100000  |  1000000
> Head               |   1.214  |  2.548  |  10.823    |  90.3       |  951.833
> Patch              |   1.215  |  2.5485 |  10.8545 |  90.94     |   955.134
> % diff              |   0.082  |   0.020   |   0.291   |   0.704    |    0.347
>
> I noticed that the test run with patches is very negligible. The
> scripts used for execution are attached.
>

You have used the synchronous_standby_name to evaluate the performance
which covers other parts of replication than the logical decoding. It
would be better to test using pg_recvlogical.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Bertrand Drouvot
Date:
Subject: Re: Orphaned Files in PostgreSQL
Next
From: David Rowley
Date:
Subject: Re: Modify an incorrect regression test case in the group by key value elimination function