Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1trmdM-009PbL-Nx for pgsql-committers@arkaria.postgresql.org; Mon, 10 Mar 2025 23:34:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1trmdL-002Qfk-F2 for pgsql-committers@arkaria.postgresql.org; Mon, 10 Mar 2025 23:34:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1trmdK-002QeM-GB for pgsql-committers@lists.postgresql.org; Mon, 10 Mar 2025 23:34:07 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1trmdG-0027u9-19 for pgsql-committers@lists.postgresql.org; Mon, 10 Mar 2025 23:34:06 +0000 Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.phl.internal (Postfix) with ESMTP id B29D611401F6; Mon, 10 Mar 2025 19:34:01 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Mon, 10 Mar 2025 19:34:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1741649641; x=1741736041; bh=gp9XGZ68Ri agbT3Y/8z2FrrXTMX6kV0f4m0E2jSU9eU=; b=ajdXlVlABt3IBjEhfmve0nUypd oJsm7TEH1OuOaBKy8A0nGRPFocHkc3rDpd1d1Sr2jBgoyDEHyEQB1K4UBR+NlFo3 zO4bZG5O2h0y+H5JPEUq0YTReVy49sQE3sF4tnCulX3eyuRrO1MqFoZoU7ADX/n+ npOgJE0U+PRakbzOJxsCuB3pzkHU8gR2yGduGxpsxWJ96EepOCNT4J96ex7OOceP NkCU3J55O1ntxW69qT1CILZ1KRghvtwLm5GhD68gZMgYmCEnbxC9MkI8PbsVbiuZ uenteYwXa1NY643pb1BkBaobfiNuaX5TorJ4gbsgmwNRiJItj2avJ9vO9t9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1741649641; x=1741736041; bh=gp9XGZ68RiagbT3Y/8z2FrrXTMX6kV0f4m0 E2jSU9eU=; b=6whUevL6X5roNl20vJAhc6gLbU3rvl/ZYUXvpcadn0MY0J5FH9p WCsn5THQ0y0/xAZAX342kbYR+zFi8umWh+qQ002KcyF89OwrhFq39KzsSACpGeh0 HBRd12YWwN26oN5F0ZCa4LKQUtDzq3eiLR+0qv5s4yGaWTc1LPlZFLPKrKtAcYf1 wr3bIefDF6QVIh8YK9tV2vyAY+/Pf4xlBwdFfGN7IoNMmJw2lfazGoZLO8rHAiRt dfCZZ8gT+lUOagDlxwNl3PQr8Bzi8jiUWp6ofeKowyfBSR0fUswMQpfb8ocdElDx CRbgJH/9KiOIsPNiYmtGygixbitSTmLgh+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvddtieekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtsfdttddt vdenucfhrhhomheptehnughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrg iivghlrdguvgeqnecuggftrfgrthhtvghrnhepfeffgfelvdffgedtveelgfdtgefghfdv kefggeetieevjeekteduleevjefhueegnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdruggvpdhnsggp rhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrnhgurhgvfi esughunhhslhgrnhgvrdhnvghtpdhrtghpthhtohepphhgshhqlhdqtghomhhmihhtthgv rhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 Mar 2025 19:34:01 -0400 (EDT) Date: Mon, 10 Mar 2025 19:34:00 -0400 From: Andres Freund To: Andrew Dunstan Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: tests: Fix race condition in postmaster/002_connection_limits Message-ID: References: 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 2025-03-10 18:46:12 -0400, Andrew Dunstan wrote: > On 2025-03-07 Fr 1:22 PM, Andres Freund wrote: > > tests: Fix race condition in postmaster/002_connection_limits > > > > The test occasionally failed due to unexpected connection limit errors being > > encountered after having waited for FATAL errors on another connection. These > > spurious failures were caused by the the backend reporting FATAL errors to the > > client before detaching from the PGPROC entry. Adding a sleep(1) before > > proc_exit() makes it easy to reproduce that problem. > > > > To fix the issue, add a helper function that waits for postmaster to notice > > the process having exited. For now this is implemented by waiting for the > > DEBUG2 message that postmaster logs in that case. That's not the prettiest > > fix, but simple. If we notice this problem elsewhere, it might be worthwhile > > to make this more general, e.g. by adding an injection point. > > > > > New test breaks when log_error_verbosity=verbose. It's adding an SQL ERRCODE > to the DEBUG string. Ugh, that's annoying. I guess no good deed (fixing the test) goes unpunished... Pushed a fix. Greetings, Andres Freund