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 1pI5Kz-0002Pj-RD for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jan 2023 10:06:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pI5Ky-0007nc-PD for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jan 2023 10:06:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pI5Kx-0007nH-TA for pgsql-hackers@lists.postgresql.org; Wed, 18 Jan 2023 10:06:32 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pI5Ku-0005fG-Vo for pgsql-hackers@lists.postgresql.org; Wed, 18 Jan 2023 10:06:30 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id A05185C0052; Wed, 18 Jan 2023 05:06:27 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 18 Jan 2023 05:06:27 -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=fm3; t=1674036387; x=1674122787; bh=m Z/u0R86fjBQDAD886T4cWTtIIs8Nj7WVb2p/BsxarU=; b=NsdYt7zQBE+2JA5a+ 3H4fXLqk5aaMDJKwd+KtrsGRqMV4oiO8FbJ7kolxiRVsmqMP0nQV4qtXkzKSwRsW Pka1ZF1mScqQzmB50b9krdlGh7qmlvBnjCe8ATIuZrlTJrlrk0mZmOqN8okhcKtR Rfmv/ICH0esjx1xOjARYrKcjgSYkx0ULoJ7m0wjh4dABIzffg4QVKPArRFBoqry3 3rFwRuas6eA0XK3JUzWBbxGumvvcMQKY5gzTn1suMpnXTSKsroZ4iJgOIhefnflg cHQGpm+BcWhkFEIY+LTOHpBPWHsVY0vYNGP0ULLQPa/3EkNskZ03/cmh3xiLey1Q KcwKw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddtkedguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 18 Jan 2023 05:06:27 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 55D7698; Wed, 18 Jan 2023 10:59:11 +0100 (CET) Date: Wed, 18 Jan 2023 10:59:11 +0100 From: Alvaro Herrera To: "Drouvot, Bertrand" Cc: PostgreSQL Hackers Subject: Re: Helper functions for wait_for_catchup() in Cluster.pm Message-ID: <20230118095911.bscvvnyu2ywhison@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-18, Drouvot, Bertrand wrote: > The current calls are done that way: > > wait_for_replay_catchup called: > - 8 times with write LSN as an argument > - 1 time with insert LSN as an argument > - 16 times with flush LSN as an argument > So it looks like that providing a node as a second argument > would not help for the wait_for_replay_catchup() case. ... unless we changed the calls that wait for reply that use write or insert so that they use flush instead. Surely everything should still work, right? Flushing would still occur, either right after the write (as the transaction commits) or ~200ms afterwards when WAL writer catches up to that point. I suppose this may fail to be true if there is some test that is specifically testing whether writing WAL without flushing works, which should rare enough, but if it does exist, in that one place we can use the underlying wait_for_catchup(). -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/