Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j3tjq-0002Dj-Tj for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Feb 2020 03:39:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j3tjp-0007TU-J6 for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Feb 2020 03:39:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j3tjp-0007T8-9y for pgsql-hackers@lists.postgresql.org; Tue, 18 Feb 2020 03:39:57 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j3tjn-00066U-4X for pgsql-hackers@postgresql.org; Tue, 18 Feb 2020 03:39:56 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 8247A2201F; Mon, 17 Feb 2020 22:39:53 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 17 Feb 2020 22:39:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=Ey4dhfKaBZwZ+8bxpvuZ/MHYUhU NTIDtVSYJSLur6YI=; b=Q4v3MES0Hx18YZkSTVEUkrzCc01sxUXgHWjP4qwZTwX 5MoNc2jtyQr9xACHIYFv+7AiI4w2hZXg0m82zCMvNdoJCYsgCfKicX+5M2KQUPt6 Wkdu7Siyfq7eGqY6oUceGpI8hSTJF3lLdif1Eg9mjvQ9N6bOThVR618ZlQGNdRbG pJbOr0YtiWc04jDH3rO1p1Og7H1kTc9Zf4+zt8lyo/xcNh3KGKyLm++6s59jRz1Z lUbFkVRuHmI6hxeMm/cnQksfGrrYyFRb7pnnJ1S2BnvE4qnZyFRJBki8y6hkPSMC /ODYrxWeJN8EedxvX+AKPxG6FcHMoe88KHEfHamk3mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Ey4dhf KaBZwZ+8bxpvuZ/MHYUhUNTIDtVSYJSLur6YI=; b=rWbZEay1t113trHJmDLp8s xqBc2escHMjkUbKeIjeWWNKzgp3XGSv8WtwHooSCNWiDGGBZPWj/b9vTVE76ZX53 eOd96YeJktC+q5kNRu1vLGsucNILPX1KFKjxpHwy81FhCdSEpoqPsNgfV5MuHqSx KC0LLnXOEAI50wbKGCU66Laxy0qFh685EctosUTGJsoNl/5+olFtkNDIh9ueVEbE Y27S9pnTVHQb4ubLks88IimYNfyBn5SRU0TrTUa0cfT1KYj9Tpak/GVoxFnUh8Rv BZzP5ZR082af4VGMF3+HBP75y9V9DKaeYTjethWWe04vEVlZjJKGp17iEg480+WQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrjeejgdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeduuddurddutddvrddukedtrddukeehnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesph grqhhuihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id EDAC930606E9; Mon, 17 Feb 2020 22:39:51 -0500 (EST) Date: Tue, 18 Feb 2020 12:39:49 +0900 From: Michael Paquier To: Fujii Masao Cc: Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: Wait event that should be reported while waiting for WAL archiving to finish Message-ID: <20200218033949.GD4176@paquier.xyz> References: <20200213032804.GB1520@paquier.xyz> <949931aa-4ed4-d867-a7b5-de9c02b2292b@oss.nttdata.com> <20200213073035.GI1520@paquier.xyz> <61477660-dded-2550-b101-c76a2f864806@oss.nttdata.com> <20200217094857.GB115140@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="A9z/3b/E4MkkD+7G" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --A9z/3b/E4MkkD+7G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 17, 2020 at 10:21:23PM +0900, Fujii Masao wrote: > On 2020/02/17 18:48, Michael Paquier wrote: >> Actually, I have some questions: >> 1) Should a new wait event be added in recoveryPausesHere()? That >> would be IMO useful. >=20 > Yes, it's useful, I think. But it's better to implement that > as a separate patch. No problem for me. >> 2) Perhaps those two points should be replaced with WaitLatch(), where >> we would use the new wait events introduced? >=20 > For what? Maybe it should, but I'm not sure it's worth the trouble. I don't have more to offer than signal handling consistency for both without relying on pg_usleep()'s behavior depending on the platform, and power consumption. For the recovery pause, the second argument may not be worth carrying, but we never had this argument for the archiving wait, did we? For both, on top of it you don't need to worry about concurrent issues with the wait events attached around. -- Michael --A9z/3b/E4MkkD+7G Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl5LXIUACgkQnvQgOdby QH0JqA/+JZ6D6syCt9iFQTf7DpcPrE6O1F0uXaIUl6X8pVb1SUSBarju8VKHr1fd EivxsWa8puJx5fg7oGStHFsH/7uiBUmQfeTfZ/fG0ScFNNpNSKPMJB1W5zLlOcYm v+DrCsvhQCW5/hsaLVJ81Hp3o8zzqJPdf+h/Og1IRuKn5ekLw2Uqx0/46Qg7yR/b 7eUGGg3qzHT55IuNkvir6yXRRR2NHj1QikD77hIfzTmdA6amdPURG76/NVeGSFIw YVjQveCXOnMnLdioGaIXh4yF7Bg6I7NXZpyTOH4FRZo2ve+Gt0h7Odh6jCVs2/Il i2WDR/Kvn66wGG3B4h7X0cOtGkWwp49kM5yTvnUSsjNjEgRbJRRz6UJahYH2rBs8 fU4aIGTAPP9yBbx6+i61/jAIJLSFrCYup76sTr48f81of6wVBhZqiqygfoJh2Hnc Kct1dP9wQfi8F7rTwkOhqkbXn/GSByYSGF2qj8Yc2/Sj6/eKn3z3n1sj0OLWMkLg Wa+aOVD9HGbT3EV9YCDDrr5W8at/d9mOH3gf2sJO8qp/4wahzT0AP6jRpagfWXKu rysnjakHAuQhDGdrVAntWhaJGvzRXXcGHC7Fv3TTHInOm6wbY4Ut/E0up1MDYicm CP2luS1X7/Fn4dfHjbV4j9NqpCJvgTjkrOs+jKeEbkY2hO9NdlU= =f96j -----END PGP SIGNATURE----- --A9z/3b/E4MkkD+7G--