Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsvGV-00A6uC-V9 for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Oct 2023 01:22:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qsvGT-00Fvu6-Ve for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Oct 2023 01:22:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsvGR-00Fvsj-U4 for pgsql-bugs@lists.postgresql.org; Wed, 18 Oct 2023 01:22:25 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qsvGO-001HHj-3v for pgsql-bugs@lists.postgresql.org; Wed, 18 Oct 2023 01:22:24 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id F08BF5C0216; Tue, 17 Oct 2023 21:22:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 17 Oct 2023 21:22:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1697592139; x=1697678539; bh=/7 iD4pyVnM0mEoKbZCYc7ME5iNKzL0QMLvJCgIMqdkQ=; b=05bG+Ki+67nKuLT5lt hi/1qL8jrQ4tnfAi2ZyBfr6Fof/QHI+j1DtXO905Ze3dLMOkoQcgTrKZF/LXokkr J2x5xv2/1F9yqF3INTyniJRps2DYIVdqrmaF8b5Jrxi1k7Rk0O3BgZm6Xn17mWdA FqyGkwJpfeJbT1Met1tWvNZUjrio4LZEtCRAyH7raupX7M2ZkPrmZ/1nY/KGwZKO hH5r+UAvtsZD9YGlo633LMst2lezMR2+mXk6gdXnXIoJq8HobFNwN99iO90rTVeR 9MdSJBYL+0hO2ODag+QZTEDKYmbBkSKuYClGyikB1ZZTxK1AShRo/kffaU7eADO5 fVZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1697592139; x=1697678539; bh=/7iD4pyVnM0mE oKbZCYc7ME5iNKzL0QMLvJCgIMqdkQ=; b=pEh8BYNzVWjNe1kCn4VPonSlv5MKE QrOLAkefM4NXRsUTCQmRL1kjV3Q9eKjb3aXpCnvTNp0HceMXaUYBqIsTc1P2CWGe jhsh1VnnW9uMhNhYprqNx9rMghXsJhMHPx66TT6IYb3EOGYsOLjw7YSJ6xcPVSPh K6BOdHpYRLKVrW9td7UbP442f2IRWC0lDMqhnjOqJ3lS9ANNf0IdOTIgpHWl823k 9Ha2cFA3cAqe8W0F6+QYylVHHTFYnqzZlOWc37dOgnE41OXQxEwrLHRp4R0xRxqq Igd9U7CGNhQbQZ7F7BDh0nkADXI/a7cqZ+H7XRoF1lAJmoR/mMAznF8sg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeefgdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt jeenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeevteejgfejveegudekheeiueei ueeiveeuiedugeehveeugffgudeuleegleeiteenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Oct 2023 21:22:18 -0400 (EDT) Date: Wed, 18 Oct 2023 10:22:14 +0900 From: Michael Paquier To: Amit Kapila Cc: "Callahan, Drew" , "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #18155: Logical Apply Worker Timeout During TableSync Causes Either Stuckness or Data Loss Message-ID: References: <18155-33f555bcc7e1105e@postgresql.org> <3AF2B908-D293-43F9-AE06-73C7797C96B0@amazon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FYBZz0Pws12qU7wm" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --FYBZz0Pws12qU7wm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 17, 2023 at 09:50:52AM +0530, Amit Kapila wrote: > On Tue, Oct 17, 2023 at 4:46=E2=80=AFAM Callahan, Drew wrote: >> On the server side, we did not see evidence of WALSenders being launched= =2E 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. >=20 > 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 --FYBZz0Pws12qU7wm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmUvM0YACgkQnvQgOdby QH16Cg//eN5Cmt7fXWiIvpcC15QldJ6LroETNBGtdeR5tmNkE1ciVSbHeFEXSLMB WL+m9mKEpjC4qT6/RoIAbb4yijQaV2OEn+CGnwefB+Unr7CfYdpnXmfoPeweIic0 2bRX41/64h7ykeHDCwoxcWZZl0g3C0+jpsDTuB4U6Toqf8DTjIAsr8Yq/gtNe9/K 2QaUQsalttDfEC2OkZjfmxEyOHiMgSYvdcOQz9sSewu8XkRessf6cKG+AG57tDLl 6qmm4bnB27GxQJU3geMuvF+qP/pR6Wzpxf+K/XKD3js1O+n8XJ7JSsGwEvmUNloy XI+nQklxiShw1mqaF4fo+4TSV7yLfH7AxQp/aEuBgENtBnPWuOk55H7QN2IivQrD Ph6PiW5AB1PKlRDolJxWZLLnSb6DDvKURW6iRinF/5cHya4ZIBVzEJ2sZFclVKPf +pAinvJMNv0ZmHwBhCyFywmQuKejg2T3hXw37n+ikMuNVDy84ZUjxjwK3CKgZRGX OWklaM2/9UIDCJ4VNr8hwWF9eEbvphZajkMHyFACVw8NN6I8dZwfjqK4EbI9s1fl 8BsQ1uh0SlGOmuhXRltKqkcoim+KPn/JiufG1Zw7JG+TxVFmT75IVremPgzB2QNA g0Kx6fERVcPGdpBho0+2X+EvNnMZV+GQTELKUm5aeEe75T95kzA= =65TC -----END PGP SIGNATURE----- --FYBZz0Pws12qU7wm--