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.92) (envelope-from ) id 1jBV3a-0007dR-JF for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Mar 2020 02:55:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jBV3Z-0004Bw-CT for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Mar 2020 02:55:45 +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 1jBV3Z-0004Bp-38 for pgsql-hackers@lists.postgresql.org; Tue, 10 Mar 2020 02:55:45 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jBV3W-0002uN-3s for pgsql-hackers@postgresql.org; Tue, 10 Mar 2020 02:55:43 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id DC23D221FD; Mon, 9 Mar 2020 22:55:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 09 Mar 2020 22:55:40 -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=+aqhR+dnHPj7W76+HLRt6zqj2Xe qS8BxIuWrKhEfF5Y=; b=eVyliiXkrc2Fhy6kZ6PS/R66eiDFOlxPSN6VnzrDOdb Z2ySAcZ0uHhlOKiTuM2udPIk9TLF5jqGUgEpxuHFRFiRN+bHnZ1d3S+E4o5462+2 zvZsH/WX6cQflc0NPRA7gu3fT2p0A4IdPQhqEP4SzW5cVxjnMCeIwp/gjkDMnV6y s0C02dnwgXqiFWYVLLC13k8k3HiaQ5V+ZtR3VHKwvWqPOasW2H+p0VxJ8YoI4jWN kfGLt3yBuaA5Saiz959zmdiGtboRv9nj5hs1WJu7wLqELUVUXxSkyDWuoMbpdjZN rBZSfxkG64kdnuIdKgR0XywbErBDsJ3o1goUfJElbCw== 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=+aqhR+ dnHPj7W76+HLRt6zqj2XeqS8BxIuWrKhEfF5Y=; b=Px0nu+TI5Z21y/Ix2bml0s olFy4DOSO88lbdkxd5JQy9Bvi5Tr7S3bGpB8RttVwCBsGupyz/8WygeYWzvgTPBC VeSTqsYEFFjuD2RzUVJ+I/LBy4tiXdfMx+IQOl1y71jsGfs8j1EufC6UJI4t6ybk s4xHYtVCdSLX+95sJ5jps6cWEnUsNFghN5iylQSF5JQk4s9TZz2RiDOtZvthP6ku LIetj2AZMMityfkiF7iKJ+9hfYQY1yup9OHQin75HkoNGDVjAxVGD2HDBSycMA0C LlFSLg3BY50lxMx7Fj2vhjbspnG07ks8ZWN+BXxz4c8hRLprRs4WXTDai0rg8YwQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudduledghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepudduuddruddtvddrudektddrudekheenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlse hprghquhhivghrrdighiii 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 E40E93280060; Mon, 9 Mar 2020 22:55:38 -0400 (EDT) Date: Tue, 10 Mar 2020 11:55:36 +0900 From: Michael Paquier To: Tom Lane Cc: Andres Freund , Julien Rouhaud , pgsql-hackers Subject: Re: Add an optional timeout clause to isolationtester step. Message-ID: <20200310025536.GC4369@paquier.xyz> References: <20200306131547.GA2904@nol> <20200307014142.GC1531@paquier.xyz> <20200307061615.c47sju2bytuiaazv@nol> <8441.1583595994@sss.pgh.pa.us> <20200307205328.ffidfyo3me46qscn@nol> <15903.1583615371@sss.pgh.pa.us> <20200307211709.6kfpiddif4uxafg5@nol> <20200309221558.7kd5fuks2alvtsex@alap3.anarazel.de> <20200310021459.GA4369@paquier.xyz> <28752.1583807547@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tqI+Z3u+9OQ7kwn0" Content-Disposition: inline In-Reply-To: <28752.1583807547@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --tqI+Z3u+9OQ7kwn0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 09, 2020 at 10:32:27PM -0400, Tom Lane wrote: > It strikes me to wonder whether we could improve matters by teaching > isolationtester to watch for particular values in a connected backend's > pg_stat_activity.wait_event_type/wait_event columns. Those columns > didn't exist when isolationtester was designed, IIRC, so it's not > surprising that they're not used in the current design. But we could > use them perhaps to detect that a backend has arrived at some state > that's not a heavyweight-lock-wait state. Interesting idea. So that would be basically an equivalent of PostgresNode::poll_query_until but for the isolation tester? In short we gain a meta-command that runs a SELECT query that waits until the query defined in the command returns true. The polling interval may be tricky to set though. If set too low it would consume resources for nothing, and if set too large it would make the tests using this meta-command slower than they actually need to be. Perhaps something like 100ms may be fine.. -- Michael --tqI+Z3u+9OQ7kwn0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl5nAagACgkQnvQgOdby QH0XxxAAnJNwpjMY2kXBazb8rlEqaq5EzncJHLQcQPq4UgWOgroo5cz1WGJvR/lL +t8jMcB1vbG8lwHHc6Kfj80DYJy/9tkQVpGKd3E3gaA/hGGAI6WpGfrs0qGcv+FT UKvpo5zEFAiHYdDLQycFw3/UifnaTPz80jy7EeHcZBrTd3xPA9inVwjgGnOsAHef RbhsFI7OUksL7cFws2Zb6I7lOVuiusnQACiud+DCINqq30D7bMqiW09TFyWL7aM0 oWIFKYUYeDGYbf0hIkqijR2VJ3IsJyNNpf6hAogAytbLYSTiRmczFfP5IRzzcxic yeTgZGkBfnyLZU5A7vvlIzwyyxnqEvFSpCrWAB1vfsu7uS5MImBMx6PeYi8p+fIe GbQECI45gKxpO1LRi1Af4hn5gZTBFtq/4MfbZpquQXdPuDunH9K2Pj9YgmH1QpVh dhHMhaHFeupdc5akfvZDoKx9/+Uasje3yG95m56GyzTnoUCFlpkRs0We5VkYGQg3 BujA+U7/rYDa2zx92vkamfmdr/MFgFSJQ9M1zeLI3KWCxi8zBegStijEgu7b9bYR D8VWKqFvIdrgDzXQcjY/acKgI2zcIYEbtY7TsZvAy/o/eYdmiA02+riEeaKvOtUv /LJoyBOm19bIAl7S3XWj/Zpu0/ca90JpN+nkmMlFKH09Rc+kvgU= =/hWS -----END PGP SIGNATURE----- --tqI+Z3u+9OQ7kwn0--