Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRWXF-0006dS-78 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Feb 2023 10:58:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pRWXE-0005cI-2x for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Feb 2023 10:58:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRWXD-0005c9-Pf for pgsql-hackers@lists.postgresql.org; Mon, 13 Feb 2023 10:58:11 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRWX9-0000JI-Is for pgsql-hackers@lists.postgresql.org; Mon, 13 Feb 2023 10:58:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id D4C7C32008FA; Mon, 13 Feb 2023 05:58:04 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 13 Feb 2023 05:58:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1676285884; x=1676372284; bh=g MPGIkNlEKWptTGoIAMhrKKvjlG+fi3j7Y3td0vjjzg=; b=WbVCaU9vYqp7litov AGpk2onTzFDUBiZWyasAva3VrrX1peD1xjP000xuPuTZDfHu0CHnVigv6rfESGl1 icIqgWtHChy9mEH68MUNh8wWkefm26gwSWNrLej2fPfL50ZXnDMmWpOx1ROb4Bvn mmLNvaC3QzbgUh2J2W9Zz5jHUajTZiWvXT4zDzct1z1E6oUCoUeg9r4NGVa9gK0f 004xARqF2bjwQRnBtHPwAqysKkCM3zHtWPaE+Vq71o2rbpCN3zsPme0N2/Kq9Bj0 kapzy5In/cqxaKfIiBIRC/UeEPGrWDuA0N3xHzbkKlwywyW9HUahihna1nG1Ipie 8URnA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeiuddgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Feb 2023 05:58:04 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 0A9379C; Mon, 13 Feb 2023 11:58:02 +0100 (CET) Date: Mon, 13 Feb 2023 11:58:02 +0100 From: Alvaro Herrera To: "Drouvot, Bertrand" Cc: PostgreSQL Hackers Subject: Re: Helper functions for wait_for_catchup() in Cluster.pm Message-ID: <20230213105802.5id6zja2bmkd4czo@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Jan-26, Drouvot, Bertrand wrote: > Hi, > > On 1/26/23 10:42 AM, Alvaro Herrera wrote: > > On 2023-Jan-26, Drouvot, Bertrand wrote: > > > > > On 1/24/23 7:27 PM, Alvaro Herrera wrote: > > > > > > 1. I don't think wait_for_write_catchup is necessary, because > > > > calling wait_for_catchup() and omitting the 'mode' and 'lsn' arguments > > > > would already do the same thing. > > Having a closer look, it does not seem to be the case. The default mode > in wait_for_catchup() is 'replay' and the default mode for the lsn is 'write'. > > But in wait_for_write_catchup() we are making use of 'write' for both. But that turns $node->wait_for_catchup('foobar', 'write') into $node->wait_for_write_catchup('foobar'); so I don't see much value in it. Also, the patch series from which this patch spawned in the first place doesn't wait for write AFAICS. After adding some more POD docs for it, I pushed the one for replay. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ ¡Ay, ay, ay! Con lo mucho que yo lo quería (bis) se fue de mi vera ... se fue para siempre, pa toíta ... pa toíta la vida ¡Ay Camarón! ¡Ay Camarón! (Paco de Lucía)