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.96) (envelope-from ) id 1w22Io-000ozP-13 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 07:23:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w22Im-0084UO-1o for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 07:23:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w22Im-0084UG-0s for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 07:23:49 +0000 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w22Ik-00000000MRf-3rVy for pgsql-hackers@postgresql.org; Mon, 16 Mar 2026 07:23:48 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id A40F77A0271; Mon, 16 Mar 2026 03:23:46 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Mon, 16 Mar 2026 03:23:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; 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=1773645826; x=1773732226; bh=UTiC1BahgF M0mG5DDw2OJ1ddj/NHm51vWEw3o6CbPXo=; b=JVOUMhxtkRwqqVj7g1TfstVkX9 ZWexvLn26HPSzO072VP+QeTE7KvAcuTKqC+YvYGCLnthT7lXf4P2G3Do2wkEZT5I ngUME++ihyFAmsa4nJPvnKnOONPRJH/rHH/2oyF8EFJ/lKvSzAb6bi4ZGC2ykfrK uGdmrArQRP9aN0c7mUMr9vpav0gjbwM9UFWc13JT0mPmFLGJ/7dzfz1wwNBn2gcf FMbbfigTQMVJYm9Gneyci6DUTYgvnnP6w2RHmyz/ColDie225+yWtpJU4TATSdkn mp2lcVtARTB3VNYEP91p18PkeSLQ/CTpq8We7jy/QlPtpYOHjJhwIT6KvA2A== 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= 1773645826; x=1773732226; bh=UTiC1BahgFM0mG5DDw2OJ1ddj/NHm51vWEw 3o6CbPXo=; b=QqCEE4G0dadEmTnjpUeIcbwmdPP5F4+IblNkabDjrohzx5ZcnM3 /ZQ33FgehCA3eWNL6b9eLhdfH6Or5KgAA0jonLm0XkM6+h2DrtY0ru44/vcVpglT vXSzR9e1cUhqwGGFJkdGUIwpBkGXTr0YKBpargCv5ZA7yI2hclzTA8QjYt2dAV+p x+8AqDmkCtMYeUEjMiay3V8uMLTRe64xcgX6IWs4gESpvMv7CbS9GLHsh4d7TYfl EFxUYARoX8MroxiY8A0G35yfMNob6L/5x/uxOmwkJQi58aCi6zulTr44NulxKCSQ 7P2CPxh7Ge405ud0HUpXPNODj/PmnLiYS3g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvleejjeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepgeffjeevgfevuddvjedtvddtieej heduueelvddufedtgfefjedvkeevkeeivddvnecuffhomhgrihhnpehpohhsthhgrhgvsh hqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhnsggprhgtphhtthhopeeipd hmohguvgepshhmthhpohhuthdprhgtphhtthhopehifigrthgrrdgrhigrsehfuhhjihht shhurdgtohhmpdhrtghpthhtohepshhmihhthhhpsgdvvdehtdesghhmrghilhdrtghomh dprhgtphhtthhopehprghvvghlrdhsthgvhhhulhgvsehgmhgrihhlrdgtohhmpdhrtghp thhtoheplhhirdgvvhgrnhdrtghhrghosehgmhgrihhlrdgtohhmpdhrtghpthhtohepkh hurhhouggrrdhhrgihrghtohesfhhujhhithhsuhdrtghomhdprhgtphhtthhopehpghhs qhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 Mar 2026 03:23:44 -0400 (EDT) Date: Mon, 16 Mar 2026 16:23:40 +0900 From: Michael Paquier To: "Aya Iwata (Fujitsu)" Cc: Peter Smith , Pavel Stehule , Chao Li , "Hayato Kuroda (Fujitsu)" , pgsql-hackers Subject: Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ukI4qtU61MWScRO8" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ukI4qtU61MWScRO8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 13, 2026 at 11:38:51AM +0000, Aya Iwata (Fujitsu) wrote: > On March 10th, the bgworker test "t/002_worker_terminate.pl" failed on th= e Build Farm. > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Djay&dt=3D2026-0= 3-10%2019%3A26%3A19 Indeed. > We are currently attempting to reproduce this issue and are considering a= fix. >=20 > According to the log, the test failed because the bgworker cannot be term= inated > within the time frame (5 seconds) when ALTER DATABASE RENAME is executed. >=20 > So I suspect that there is a lock conflict. Aye, we have a timing issue here, and at first it seemed to me that this was a bug in the backend logic. But actually I suspect that it is simpler than that: we don't disable autovacuum so couldn't an autovacuum worker connect to the database "testdb" that we are trying to rename in this query? I cannot be 100% sure because we have reduced the log activity for the sake of the tests, but that feels possible to me. We could try to disable autovacuum entirely, then see if the situation gets better in the buildfarm. The failure rate is so low that it is likely going to take a few weeks to check the stability of the situation. We could also lot more things, of course, as a temporary solution. What do you think? -- Michael --ukI4qtU61MWScRO8 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmm3r/wACgkQnvQgOdby QH1N6A//We1W5AIxd0XeRVfaEiWm10tKnaPW2cOOA9LHmpwuXSGemfU1cqKgbfYy XSVF2iWMKtLsAg9rQMwilWAjE8DW47Tv/A9U3RVG8ZZRe4vD+SX2c6UUN0882wG6 Ud9jbwrdIQpjiadbuGliYTuXoaohS8+JPf6H5eXnftr+7ofdXr8YxTgJpKIuJXlW KRqVMKMNNHHxB9oskjyoFnwN5trEl/JEPjRW1Y7yWPMA/BwqYlmC2DoyEEZKUuW5 HpBfbuHaK+F7dNFRteEVkIi+2jsEZcNdM/G7G2A9d9B2m36myu970WC/8PRWmldq SQ1bdpEFfj30WnQW1PlP84iAEMz6jOhHHvsl5havFA9Fq/RZizgBExZvb678Y9KO H/EJAsV6U7MmKdXJGTJmlsJ9KekkCSg7q7JgD98u3PZKQCoNqZQJnqzBTHZlRiUM 1pz3n1/tSC/v8B6a1SzPX/FLyWxx+/0LMJeJMP97Bt4PVNXrdwjuVGU4ovWH4nn4 /v5efIy8HmxWGFrF/3XqrRd3wDbUTNl7UGAaJOfCGFiORTwU7lU7KQ3HhMHCIb8J uvb8LLbN+C4n3Dr/CEWtbMEx2+PHvAJL1djpCGi/x6S+/I+H1cdiIYlvcP2hEYaH 7etZqFhY5rIMzJURLlzToOKEdHjhjTxyo6mhCd7T/hH8H2Q/0HM= =DlZE -----END PGP SIGNATURE----- --ukI4qtU61MWScRO8--