Re: 040_pg_createsubscriber.pl is slow and unstable (was Re: speed up a logical replica setup) - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: 040_pg_createsubscriber.pl is slow and unstable (was Re: speed up a logical replica setup)
Date
Msg-id CAA4eK1JBTxw98n_3CwbUUwE8j=QbCQr3uecgA7sOLB3Ys9jTzA@mail.gmail.com
Whole thread Raw
In response to Re: 040_pg_createsubscriber.pl is slow and unstable (was Re: speed up a logical replica setup)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Jul 30, 2024 at 9:56 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Amit Kapila <amit.kapila16@gmail.com> writes:
> > On Tue, Jul 30, 2024 at 1:48 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> If the problem can be correctly described as "pg_createsubscriber
> >> takes 10 seconds or so to detect end-of-stream",
>
> > The problem can be defined as: "pg_createsubscriber waits for an
> > additional (new) WAL record to be generated on primary before it
> > considers the standby is ready for becoming a subscriber". Now, on
> > busy systems, this shouldn't be a problem but for idle systems, the
> > time to detect end-of-stream can't be easily defined.
>
> Got it.  IMO, that absolutely will be a problem for real users,
> not only test cases.
>
> > One of the proposed solutions is that pg_createsubscriber generate a
> > dummy WAL record on the publisher/primary by using something like
> > pg_logical_emit_message(), pg_log_standby_snapshot(), etc. This will
> > fix the problem (BF failures and slow detection for end-of-stream) but
> > sounds more like a hack.
>
> It's undoubtedly a hack, but I like it anyway because it's small,
> self-contained, and easily removable once we have a better solution.
> As you say, it seems a bit late in the v17 cycle to be designing
> anything more invasive.
>

Thanks for your feedback. We will proceed in that direction and try to
close this open item.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 040_pg_createsubscriber.pl is slow and unstable (was Re: speed up a logical replica setup)
Next
From: Amit Langote
Date:
Subject: Re: pgsql: Add more SQL/JSON constructor functions