From: Michael Paquier <michael@paquier.xyz>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Callahan, Drew <callaan@amazon.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #18155: Logical Apply Worker Timeout During TableSync Causes Either Stuckness or Data Loss
Date: Wed, 18 Oct 2023 10:22:14 +0900
Message-ID: <ZS8zRgKfB7AcxJWv@paquier.xyz> (raw)
In-Reply-To: <CAA4eK1+ytq53_GmDLCmxkDqvwgbgxBNg-694grxxaVSQadZA5Q@mail.gmail.com>
References: <18155-33f555bcc7e1105e@postgresql.org>
<CAA4eK1JRhXZCg46OL--V+4ZqDGtBySqiraWGrJZXkyh2H-M1eg@mail.gmail.com>
<3AF2B908-D293-43F9-AE06-73C7797C96B0@amazon.com>
<CAA4eK1+ytq53_GmDLCmxkDqvwgbgxBNg-694grxxaVSQadZA5Q@mail.gmail.com>
On Tue, Oct 17, 2023 at 09:50:52AM +0530, Amit Kapila wrote:
> On Tue, Oct 17, 2023 at 4:46 AM Callahan, Drew <callaan@amazon.com> wrote:
>> On the server side, we did not see evidence of WALSenders being launched. As a result, the gap kept increasing further
>> and further since they workers would not transition to the catchup state after several hours due to this.
>
> One possibility is that the system has reached
> 'max_logical_replication_workers' limit due to which it is not
> allowing to launch the apply worker. If so, then consider increasing
> the value of 'max_logical_replication_workers'. You can query
> 'pg_stat_subscription' to know more information about workers. See the
> description of subscriber-side parameters [1].
Hmm. So you basically mean that not being able to launch new workers
prevents the existing workers to move on with their individual sync,
freeing slots once their sync is done for other tables. Then, this
causes all all of the existing workers to remain in a syncwait state,
further increasing the gap in WAL replay. Am I getting that right?
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, amit.kapila16@gmail.com, callaan@amazon.com
Subject: Re: BUG #18155: Logical Apply Worker Timeout During TableSync Causes Either Stuckness or Data Loss
In-Reply-To: <ZS8zRgKfB7AcxJWv@paquier.xyz>
References: <18155-33f555bcc7e1105e@postgresql.org> <CAA4eK1JRhXZCg46OL--V+4ZqDGtBySqiraWGrJZXkyh2H-M1eg@mail.gmail.com> <3AF2B908-D293-43F9-AE06-73C7797C96B0@amazon.com> <CAA4eK1+ytq53_GmDLCmxkDqvwgbgxBNg-694grxxaVSQadZA5Q@mail.gmail.com> <ZS8zRgKfB7AcxJWv@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox