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

From Tom Lane
Subject Re: 040_pg_createsubscriber.pl is slow and unstable (was Re: speed up a logical replica setup)
Date
Msg-id 2946218.1722313591@sss.pgh.pa.us
Whole thread Raw
In response to Re: 040_pg_createsubscriber.pl is slow and unstable (was Re: speed up a logical replica setup)  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: 040_pg_createsubscriber.pl is slow and unstable (was Re: speed up a logical replica setup)
List pgsql-hackers
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.

            regards, tom lane



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Conflict Detection and Resolution
Next
From: Amit Kapila
Date:
Subject: Re: 040_pg_createsubscriber.pl is slow and unstable (was Re: speed up a logical replica setup)