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 1rlWF5-002rzt-Rg for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Mar 2024 15:46:40 +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 1rlWF3-00GPa9-Tu for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Mar 2024 15:46:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rlWF3-00GPa1-G5 for pgsql-hackers@lists.postgresql.org; Sat, 16 Mar 2024 15:46:38 +0000 Received: from wfhigh7-smtp.messagingengine.com ([64.147.123.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rlWEv-004puf-SE for pgsql-hackers@lists.postgresql.org; Sat, 16 Mar 2024 15:46:36 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.west.internal (Postfix) with ESMTP id CF74818000F1; Sat, 16 Mar 2024 11:46:28 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute2.internal (MEProxy); Sat, 16 Mar 2024 11:46:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eulerto.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1710603988; x=1710690388; bh=+ETmcMH6nR EkW6MmVbg5GIFe7YONgvrPMHZji22Onlc=; b=mHM+lsKgP3lx2vUZuFzH+SsVwb Y45VudYHKa8Yfoa0LHRDvh/1ITHjUp7zks3ScSvHP9wFNUa6PDoA69Rgfq9Zwhnv J0COw0EjuJZkzsY9H3RhOQgWh0BRvub8bbbXXGNnb+kiZZg3KXex/zCQsz1qzxHI IaUgVoLv93YtfXvBdE525EnFy7z4Od2S4btbg4Q1Ew6W6VAchO9ZqKlVSK81jGbZ SMWoNTrICqLAPmDzRqSet0sr0kQi1X8w73EroTotZ61x0XlPxdYfZ7gAL7LB28i1 QJVHFVOqatAHFYAXlYAKKCj1YiE8qzyoh5wPdBV58fGnW2WmzdjAjvHQmWCQ== 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:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1710603988; x=1710690388; bh=+ETmcMH6nREkW6MmVbg5GIFe7YON gvrPMHZji22Onlc=; b=Sm49kpZT2P1YWezuxeoybC/9Pa23E1J5t4434S1eCLIc nV9zLBB9xV9YP7yaz7dUcjrf6OspqivMlbwAFvVeyW49KJJNMpYzPIBZSsARCRMq H2Ou9cZA9txswdsY/YMz0tSd9QYW1TfLKSMSeL5oLLlhbeUQTa8KzX9O/gF4E0P9 4k9g7FZtlLKVrVhIw99QYC2E+EGE5C19FJOHvA7sGeC2Py40cOHAAloYboT/2YMt 7f1doZN/9itEMaamUN2/4q4osifJJMmyiKBGN8HCgYdi+09S6cbxm/hnx2C7mrQd RQSyrDFV0G5LxPML4Vm8V5ZtI0aksBlcPlwABOIAbQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkedvgdehjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesrgdtreerreertdenucfhrhhomhepfdfguhhl vghrucfvrghvvghirhgrfdcuoegvuhhlvghrsegvuhhlvghrthhordgtohhmqeenucggtf frrghtthgvrhhnpeehvdevueeljeekfeeliefhfeefgfffgeeufefhvdeugedttdegvdeh uedvgfdugfenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgpdgvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegvuhhlvghrsegvuhhlvghrthhordgtohhm X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 780D415A0092; Sat, 16 Mar 2024 11:46:27 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-300-gdee1775a43-fm-20240315.001-gdee1775a MIME-Version: 1.0 Message-Id: <60a297be-c0c7-4468-88d2-81ba560e1f9f@app.fastmail.com> In-Reply-To: References: <9a9c7e65-c47b-4400-a63e-ac6169c0860e@app.fastmail.com> <2edde173-5ff9-45fd-b881-cd04eb13049f@app.fastmail.com> <2231a04b-f2d4-4a4e-b5cd-56be8b002427@app.fastmail.com> <40595e73-c7e1-463a-b8be-49792e870007@app.fastmail.com> <6423dfeb-a729-45d3-b71e-7bf1b3adb0c9@enterprisedb.com> <8d52c226-7e34-44f7-a919-759bf8d81541@enterprisedb.com> Date: Sat, 16 Mar 2024 12:46:07 -0300 From: "Euler Taveira" To: "vignesh C" , "kuroda.hayato@fujitsu.com" Cc: "pgsql-hackers@lists.postgresql.org" , "Tomas Vondra" , "Michael Paquier" , "Peter Eisentraut" , "Andres Freund" , "Ashutosh Bapat" , "Amit Kapila" , "Shlok Kyal" , =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= Subject: Re: speed up a logical replica setup Content-Type: multipart/alternative; boundary=e4fdbbeb03b74adda6a776413cfb26fc List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --e4fdbbeb03b74adda6a776413cfb26fc Content-Type: text/plain On Sat, Mar 16, 2024, at 10:31 AM, vignesh C wrote: > I was able to reproduce this random failure and found the following reason: > The Minimum recovery ending location 0/5000000 was more than the > recovery_target_lsn specified is "0/4001198". In few random cases the > standby applies a few more WAL records after the replication slot is > created; this leads to minimum recovery ending location being greater > than the recovery_target_lsn because of which the server will fail > with: > FATAL: requested recovery stop point is before consistent recovery point Thanks for checking. I proposed an alternative patch for it [1]. Can you check it? [1] https://www.postgresql.org/message-id/34637e7f-0330-420d-8f45-1d022962d2fe%40app.fastmail.com -- Euler Taveira EDB https://www.enterprisedb.com/ --e4fdbbeb03b74adda6a776413cfb26fc Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Sat, Mar 16,= 2024, at 10:31 AM, vignesh C wrote:
I was able to reproduce this random failure an= d found the following reason:
The Minimum recovery ending = location 0/5000000 was more than the
recovery_target_lsn s= pecified is "0/4001198". In few random cases the
standby a= pplies a few more WAL records after the replication slot is
created; this leads to minimum recovery ending location being greater<= br>
than the recovery_target_lsn because of which the server w= ill fail
with:
FATAL:  requested recove= ry stop point is before consistent recovery point
=

Thanks for checking. I proposed an alternative patch= for it [1]. Can you check
it?

[1] https://www.postgresql.org/= message-id/34637e7f-0330-420d-8f45-1d022962d2fe%40app.fastmail.com


--
Euler Taveira
--e4fdbbeb03b74adda6a776413cfb26fc--