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 1s9nhz-005EgT-48 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 May 2024 15:16:52 +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 1s9nhz-000VWe-1u for pgsql-hackers@arkaria.postgresql.org; Wed, 22 May 2024 15:16:51 +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 1s9nhy-000VWW-5V for pgsql-hackers@lists.postgresql.org; Wed, 22 May 2024 15:16:50 +0000 Received: from fhigh8-smtp.messagingengine.com ([103.168.172.159]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9nhv-001TEp-2l for pgsql-hackers@lists.postgresql.org; Wed, 22 May 2024 15:16:48 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id DCD3A1140198; Wed, 22 May 2024 11:16:45 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute2.internal (MEProxy); Wed, 22 May 2024 11:16:45 -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=1716391005; x=1716477405; bh=a5pY7u1Ud9 yRi/f82HJC+CgLHIitNJM07Otv4HLuoUM=; b=KFGpQ8xCrJhSfp1UWbivdDQjOg KvhePGavhwd/OA83VM9zxvWjuqQvp29S6MblU19zIOhbKg2ttfoWxlQdqSSfGVJ9 jxk9qsiZvqKEsjrBhwJzdRVoaiQcxO0/XXSgV6vMVpn78htU9E+VYSVCKftcbdh5 WYm+ThGLQuayUzf+Ox9LdwFLmWIKOwxcyJlLeFhkIaQvo7dFTCBITgkDNNJvL8Dj 2eI2Xa0CBBSv8wlzRrG8GtQLbkjuS/8hnzNXm4Dbn929GgIXoeIeffAUUAnP5Xhc qkHpu9IhDtepFAI0JDgrgrcsAjgNND25ZL5jIZmA89cuduyhTgbG7GTRudoA== 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=1716391005; x=1716477405; bh=a5pY7u1Ud9yRi/f82HJC+CgLHIit NJM07Otv4HLuoUM=; b=Z83H+mT/hu2EhhQsdLVnl/iooJ/VHbUy6a1QO6n9u5Sw AQrf9InXltUzTLNY403RBQIViSHoWLKusnYSME5QQA0f8D8JnZjp5E7yGc2hbG+Y 3Rb82HJxBao/emetMRp7tZOeoLWNoLxKls2VMGk4xW9jPUQnXSIgOK5ffoG+h8Lg dLZS80aUVMtrBWicx3f66S8oilMNFHmCQets4ln5O4sXZ0vTpOKzzCCr50ZU0FVl +ST5ydHqYWrr5XVjrSkBNMsJ5TebUw098f3WXJvPssg0/jXiT5W/SJZBy5OuwYkd yo8ToUUWSq7ZW4djpxIhkIT/4eJgP/7PkhCyCwvMFg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeigedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsegrtderreerredtnecuhfhrohhmpedfgfhu lhgvrhcuvfgrvhgvihhrrgdfuceovghulhgvrhesvghulhgvrhhtohdrtghomheqnecugg ftrfgrthhtvghrnhepgfffjedviedvkedviedvteduieekudeivedthffhuddvteegleet ieffkeeghfdvnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegvuhhlvghrsegv uhhlvghrthhordgtohhm X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 84DAC15A0092; Wed, 22 May 2024 11:16:45 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-480-g515a2f54a-fm-20240515.001-g515a2f54 MIME-Version: 1.0 Message-Id: <5da4b286-e570-4341-8262-92d763f6b1a4@app.fastmail.com> In-Reply-To: References: <9a9c7e65-c47b-4400-a63e-ac6169c0860e@app.fastmail.com> <2f0b73f3-e7c0-4e95-9712-1993442a6b64@app.fastmail.com> <34637e7f-0330-420d-8f45-1d022962d2fe@app.fastmail.com> <7a970912-0b77-4942-84f7-2c9ca0bc05a5@eisentraut.org> <44de4e04-db22-40ed-8ba9-46387dc8bf83@app.fastmail.com> <3fa9ef0f-b277-4c13-850a-8ccc04de1406@eisentraut.org> <65b841a8-0c2f-4953-b9cd-240fce84b90b@eisentraut.org> <47524383-6fd1-4b13-8c4e-fb918b1d35ba@enterprisedb.com> <2e86cf53-c806-49d2-9a10-1a1257776d1f@app.fastmail.com> Date: Wed, 22 May 2024 12:16:24 -0300 From: "Euler Taveira" To: "Amit Kapila" , "Shlok Kyal" Cc: "Tomas Vondra" , "kuroda.hayato@fujitsu.com" , "Peter Eisentraut" , "Bharath Rupireddy" , "pgsql-hackers@lists.postgresql.org" , "Michael Paquier" , "Andres Freund" , "Ashutosh Bapat" , =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= , "vignesh C" Subject: Re: speed up a logical replica setup Content-Type: multipart/alternative; boundary=130ade43fb1b441b93b475425459e0ae List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --130ade43fb1b441b93b475425459e0ae Content-Type: text/plain On Wed, May 22, 2024, at 8:19 AM, Amit Kapila wrote: > > > > v2-0001: not changed > > > > Shouldn't we modify it as per the suggestion given in the email [1]? I > am wondering if we can entirely get rid of checking the primary > business and simply rely on recovery_timeout and keep checking > server_is_in_recovery(). If so, we can modify the test to use > non-default recovery_timeout (say 180s or something similar if we have > used it at any other place). As an additional check we can ensure that > constent_lsn is present on standby. That's exactly what I want to propose as Tomas convinced me offlist that less is better when we don't have a useful recovery progress reporting mechanism to make sure it is still working on the recovery and we should wait. > > v2-0002: not changed > > > > We have added more tries to see if the primary_slot_name becomes > active but I think it is still fragile because it is possible on slow > machines that the required slot didn't become active even after more > retries. I have raised the same comment previously [2] and asked an > additional question but didn't get any response. Following the same line that simplifies the code, we can: (a) add a loop in check_subscriber() that waits until walreceiver is available on subscriber or (b) use a timeout. The main advantage of (a) is that the primary slot is already available but I'm afraid we need a escape mechanism for the loop (timeout?). I'll summarize all issues as soon as I finish the review of sync slot support. I think we should avoid new development if we judge that the item can be documented as a limitation for this version. Nevertheless, I will share patches so you can give your opinion on whether it is an open item or new development. -- Euler Taveira EDB https://www.enterprisedb.com/ --130ade43fb1b441b93b475425459e0ae Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Wed, Ma= y 22, 2024, at 8:19 AM, Amit Kapila wrote:
>
> v2-0001: not cha= nged
>

Shouldn't we modify= it as per the suggestion given in the email [1]? I
am won= dering if we can entirely get rid of checking the primary
= business and simply rely on recovery_timeout and keep checking
=
server_is_in_recovery(). If so, we can modify the test to use
non-default recovery_timeout (say 180s or something similar if = we have
used it at any other place). As an additional chec= k we can ensure that
constent_lsn is present on standby.

That's exactly what I want to p= ropose as Tomas convinced me offlist that less is
better w= hen we don't have a useful recovery progress reporting mechanism to make=
sure it is still working on the recovery and we should wa= it.

> v2-0002: not changed
>

<= /div>
We have added more tries to see if the primary_slot_name becom= es
active but I think it is still fragile because it is po= ssible on slow
machines that the required slot didn't beco= me active even after more
retries. I have raised the same = comment previously [2] and asked an
additional question bu= t didn't get any response.

Fol= lowing the same line that simplifies the code, we can: (a) add a loop in=
check_subscriber() that waits until walreceiver is availa= ble on subscriber or
(b) use a timeout. The main advantage= of (a) is that the primary slot is already
available but = I'm afraid we need a escape mechanism for the loop (timeout?).
=

I'll summarize all issues as soon as I finish the re= view of sync slot support. I
think we should avoid new dev= elopment if we judge that the item can be
documented as a = limitation for this version. Nevertheless, I will share patches
so you can give your opinion on whether it is an open item or new = development.


--
Euler= Taveira
=

--130ade43fb1b441b93b475425459e0ae--