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 1lVpQt-00015P-9n for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Apr 2021 05:48:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lVpQs-0005eb-7b for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Apr 2021 05:48:22 +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 1lVpQs-0005eU-0o for pgsql-hackers@lists.postgresql.org; Mon, 12 Apr 2021 05:48:22 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVpQp-0006uT-Ll for pgsql-hackers@lists.postgresql.org; Mon, 12 Apr 2021 05:48:21 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C00855C0046; Mon, 12 Apr 2021 01:48:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 12 Apr 2021 01:48:18 -0400 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=DUkRQjeUcpIPKqzeGBLX2prabjU plvwMunkgT9jToCw=; b=rhnapwLvSytx+Hvq7KeXVrImlamGlf6P5qZZDrHS+/0 7RgXKacNzKPGHcX79O0b0DPxMlj/7t8r03J1UTVIdD6OFzWBlMmfGtfAIUTQJfhH 10BUMX01+9OwJXL0DccLZokn5PZN6HapA1K0ktsX/Mnq+cEwiF/FtSkav3nDGSrP 5IR2JAMhhvHyY8RAVQ3SLSTRJBvx+nzpfu1vGzcTbFlImWrhkkgWnhhSg5WrvbwI H4SGaT6yGoj2rxmzuUycYyt4YNKkTQ5LVkLugs5AbZhKdvVb3gKHBl/nuqjSx5Qd wfTtytPw/e4p5g+QFDwM7VXijctPh6ABUPy+2HH0T2g== 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=DUkRQj eUcpIPKqzeGBLX2prabjUplvwMunkgT9jToCw=; b=KI8xG+dPqdtp6nCTWMVKiG e/nrRLx2PJScVdtC0J2qWXq8QZbwvsnOX2bbLIaaoD9REiqBvEt5xP+/U5/C5nrU plTkyt71qJAnCjdIp8E0YM4Fxa4KXuQJiUPQCge/kZWTFVMNxbiTMnL6+ZaYaF++ LTTjn7S/Hjnq6JLVyrIKPAgDvYGkslLQcU0/ByCDt6A3fXgQNbsvGTCO2DR9fnQk 1uwpn6+COjyhjHZ7ICfvNpLY1vv3xCFSi47X5gerudUbe7rdEDip79ff01668LHI y17F2Nm38fXBHtGAYF8ug4QZDLTkAnR5IwixCvBPdALjaDPym3xo4weVcUztCE8Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudekiedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtroertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeehgedtueehkeetgeeuvedtleel keeggeefteefjeejgfekheeikeevjeehudejheenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii 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 C0C3A1080057; Mon, 12 Apr 2021 01:48:16 -0400 (EDT) Date: Mon, 12 Apr 2021 14:48:08 +0900 From: Michael Paquier To: Bharath Rupireddy Cc: PostgreSQL Hackers Subject: Re: Simplify backend terminate and wait logic in postgres_fdw test Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="q/DoP/RwcAp0JO3e" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --q/DoP/RwcAp0JO3e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 09, 2021 at 04:53:01PM +0530, Bharath Rupireddy wrote: > I feel that we can provide a high timeout value (It can be 1hr on the > similar lines of using pg_sleep(3600) for crash tests in > 013_crash_restart.pl with the assumption that the backend running that > command will get killed with SIGQUIT) and make pg_terminate_backend > wait. This unreasonably high timeout looks okay because of the > assumption that the servers in the build farm will not take that much > time to remove the backend from the system processes, so the function > will return much earlier than that. If at all there's a server(which > is impractical IMO) that doesn't remove the backend process even > within 1hr, then that is anyways will fail with the warning. You may not need a value as large as 1h for that :) =20 Looking at the TAP tests, some areas have been living with timeouts of up to 180s. It is a matter of balance here, a timeout too long would be annoying as it would make the detection of a problem longer for machines that are stuck, and a too short value generates false positives. 5 minutes gives some balance, but there is really no perfect value. > With the attached patch, we could remove the procedure > terminate_backend_and_wait altogether. Thoughts? That's clearly better, and logically it would work. As those tests are new in 14, it may be a good idea to cleanup all that so as all the branches have the same set of tests. Would people object to that? -- Michael --q/DoP/RwcAp0JO3e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmBz3xgACgkQnvQgOdby QH08Yg//Q32XgVVGdzd3C4AyaulywwSGOcoIzZw8lt4OuMyTbZTrknD+kA2gwPvt Ycuq8MFmSw8wkGOUDhcd6kYGmyW6nWWjUHCtnC6MLtXZMAQcP5prthrONJaKJJdh /WlTRAVp46KMmGbjQepBbG7YZU7nwrLyGAY1KbHU6RF1+cMMg1Ji1G4wQEvUzFKO 7lP3Ec/JoZuHsH0mBWhpT4KeqbYjtvTubfM/6j61ZoVH79UaINpkUHkzxJQXocQs 43pszJcdvotV5Wr882aTgj4aNYR5MvAEpKuyZvy5MNdETB/WBUQHLaplbxsa+3X7 C4njvYih7dcHwVT+5Que9OCn0Ety/64ZFuUZhFETBtVsMAva4CD0/g66ZRV0/PYn c9OZNbmF2LgcHwL15tRBAB2B6Ro5WT9XyojXRaemvQtuKAHSyDSH06ZDhh9iWEDG mStMJ7klwjbuf4v3NFBEk36WfjwbxPtYjgYUK/fJxP1YRxxNiW7rEHoOzPHt4IMi nHVinqZs5NANEf+k3S8aMDGyxGw8w2796PIZbFoVoUMsz6Nk3CWtp0ZsKPLZHmfn ZCljgK0nbm514iLhHV2nViLWU0NseJVblA4KHQOHYAkuhpQeRfKY1Is9PCdYZfAJ Gccx4pkTExyQv1hJchKcn5/JAdwFuuw0xoKxWUCSj/xys1V+gWA= =ZzFk -----END PGP SIGNATURE----- --q/DoP/RwcAp0JO3e--