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 1nZatq-000137-Oe for pgsql-committers@arkaria.postgresql.org; Wed, 30 Mar 2022 16:10:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZasr-0006KW-La for pgsql-committers@arkaria.postgresql.org; Wed, 30 Mar 2022 16:09:21 +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 1nZasr-0006Fq-E3 for pgsql-committers@lists.postgresql.org; Wed, 30 Mar 2022 16:09:21 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZasp-0001Jd-4u for pgsql-committers@lists.postgresql.org; Wed, 30 Mar 2022 16:09:20 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id E59C53201FCE; Wed, 30 Mar 2022 12:09:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 30 Mar 2022 12:09:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=lb05YOokG9fig+PRi8hp+hcp2xbDqqcl88fvGi G7di0=; b=zFzark1rMnVq2P0GsZ2dnFxNYs6+juh90srChHkBSxOraVF1Jt6WPa MsTRIP5Gpm//KTgIuVmsMVPIokgfV2c+8IAXc9MA9V4qtGEeqjaU7iEg3a+1yLkV 9bwsU42G7bCq28zCIk+LvMepvhdk/xqwHELDOJoILwhEdjN5TZltJ8X4XePQqUa4 8kPL47dVKUzbI04BVmFSgtA76WLfGePa1+1Z3izgwGLiSzBqgQvsDuuA1HyWkYxP epCcQEtysZ22vNgt/qPbQQJ36cvovMW1FGFF9QHlTgG81/EciIjsKZJ/2LdFf8Nx S3C4hdJY8AQ/MnX1s5OUoxHs7nXUYnDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=lb05YOokG9fig+PRi 8hp+hcp2xbDqqcl88fvGiG7di0=; b=JAkPE3WSilpj+mqUwUBh4gYNU7oWv0Yq/ 8Qr9zh1221l2956T+YeDozlOkSUMeyB56L1T0hXZEPS3N8DGjNTTmXX+OZb4zPkU 12U9E71A/0WAVK56inDpHLwlK2e/8Ajo/Xi94PPLRYQjnqZ/y+Bvq+iORDrZQrEA aYMSSxVXEPvAGGroqw/YnuI/RCWUYosWaSoRm0Y9ItltgqVxWSDQBPNlOIOieINy e63R/HuQgRAtHjW1XPRwkIGJorO9sJ5Rfh4nZ7BinXulmguJN8SOz+kgelx1KNaA R6hIWwEr86wEWT/lFZdjsF5jCc93O8vY/VaYyk4C+u1ZU9XwXqpyg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeivddgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 30 Mar 2022 12:09:17 -0400 (EDT) Date: Wed, 30 Mar 2022 09:09:16 -0700 From: Andres Freund To: Daniel Gustafsson Cc: pgsql-committers@lists.postgresql.org, Michael Paquier Subject: Re: pgsql: Add function to pump IPC process until string match Message-ID: <20220330160916.vpsxtjss25yfyq3p@alap3.anarazel.de> References: <20220329225819.ahk5u2tax3ez6d2t@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-03-30 09:10:17 +0200, Daniel Gustafsson wrote: > > On 30 Mar 2022, at 00:58, Andres Freund wrote: > > On 2022-02-23 13:32:03 +0000, Daniel Gustafsson wrote: > > >> Add function to pump IPC process until string match > >> > >> Refactor the recovery tests to not carry a local duplicated copy of > >> the pump_until function which pumps a process until a defined string > >> is seen on a stream. This reduces duplication, and is in preparation > >> for another patch which will also use this functionality. > > > > I'm a bit disappointed by the moved function not having the diagnostic output > > that at least the version in 013_crash_restart.pl had. How is one supposed to > > figure out what caused a timeout with the new central version? > > Thats my bad then. Since we don't really have diag output in any module I was > going off that "precedent" when moving this over. We have a few places that manually output diagnostic stuff by printing with # etc. > > Given that timeouts are the only way tests using pump_until() fail, that's not > > great. > > They can also fail on the pumped process crashing/exiting before the timeout > without emitting the expected output. Fair. > Would adding back something like the (right now untested) below be what you're > after? Looking at the perldoc I didn't see any other debugging aids we can > emit other than the stream and type of error. I found showing the regex from before useful. Often there's many pump_until()'s, and the regex makes it easier to figure out what errored out. And it shows quoting problem. Since it only happens when there was a failure, it's not like it'll bloat the log unduly. Greetings, Andres Freund