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 1wCeI9-002BtK-31 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Apr 2026 13:59:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wCeI8-00CAb5-0s for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Apr 2026 13:59:01 +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 1wCeI7-00CAav-12 for pgsql-hackers@lists.postgresql.org; Tue, 14 Apr 2026 13:59:00 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wCeI5-00000000yuT-3HVc for pgsql-hackers@lists.postgresql.org; Tue, 14 Apr 2026 13:58:59 +0000 Received: from phl-compute-07.internal (phl-compute-07.internal [10.202.2.47]) by mailfhigh.stl.internal (Postfix) with ESMTP id 819F37A013C; Tue, 14 Apr 2026 09:58:56 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Tue, 14 Apr 2026 09:58:56 -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=fm2; t=1776175136; x=1776261536; bh=d+/L/oX4E9 JFfB27fS9oPqQzlGN9NhxufQKaWYRWaRs=; b=KV4Pst5Iygq0Ww89txH+oOYkwp L3PcniHJhDdFHdA4WHf6Mu4U8sPPDSbUXEYE6uPMQUJQOke30sa6OSNSD8Q5siXm OuaIJweGW4l+BSLrTmcP7m0JiDWd9hCmp34jofKzsMB677qlNYaU/XCSz3ZRNjZ5 aM1tnnyQOdRYMTJCHKmg//QvEn/rAozL6SGXFsxVQFLdjtp0KT/mob3NotugXWet 30fhEQSBFjyc/BPZouZ0nuhtgKputWC7MbasAhYEQ8vFotcEbZXdOoqAond84Q/T S3Fn7mnaZF8w0QLqpvdSXxGg+Cjl05FSewnHRjHWQDdumxI30Yor4/2Rj7RA== 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=fm2; t= 1776175136; x=1776261536; bh=d+/L/oX4E9JFfB27fS9oPqQzlGN9NhxufQK aWYRWaRs=; b=Ci6L2UUHYq0whzUY8YK6PXw2mLsQrjR+XJ4Hih/9EZzGDtvN/Fd xh90/dJTvPpcpww3AmmwXINTqIZzm6IqIh201Vph0sla076R7mwhwQx3IIYfM5Ad rnI6FalfdDrSp3xB5lYCpKLaL4wvJM4BQRoI7+1HiXGaWlsngJP+73UhbWJg4JGx rYvdr0ArSOvl1Nin4s/rEGB/l5W31GsRSEncPMBWhXOPtmCiFHW7s3S4Mv9uGDzU ftj0G++VA6wi4blYcLPKCDMifccYuwSMKaZrK9QgdedERCE5iSCeVZcK0io8b2pi Nj9jOvL5v2qP249scxDZ3A0wSxMx92uomvw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdegudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehttdfstddttddvnecuhfhrohhmpeetnhgurhgvshcu hfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrghtth gvrhhnpeeffffgledvffegtdevlefgtdeggffhvdekgfegteeiveejkeetudelveejhfeu geenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnh gurhgvshesrghnrghrrgiivghlrdguvgdpnhgspghrtghpthhtohepkedpmhhouggvpehs mhhtphhouhhtpdhrtghpthhtoheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdroh hrghdprhgtphhtthhopegrhhestgihsggvrhhtvggtrdgrthdprhgtphhtthhopegrmhhi thdrkhgrphhilhgrudeisehgmhgrihhlrdgtohhmpdhrtghpthhtohepsghovghkvgifuh hrmhdophhoshhtghhrvghssehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhhihhgrihhl nhhikhgrlhgrhigvuhesghhmrghilhdrtghomhdprhgtphhtthhopehsrhhinhgrthhhvd dufeefsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshes lhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtoheprhhosgesgiiiih hllhgrrdhnvght X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Apr 2026 09:58:55 -0400 (EDT) Date: Tue, 14 Apr 2026 09:58:55 -0400 From: Andres Freund To: Antonin Houska Cc: Mihail Nikalayeu , Amit Kapila , Alvaro Herrera , Srinath Reddy Sadipiralla , Matthias van de Meent , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] Message-ID: References: <4n4q3preb3lgyhpzstebhux7b2aojhsw7gik4ivaznyggiezrs@lrznutssxlh2> <9539.1775724194@localhost> <112208.1776173876@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <112208.1776173876@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-04-14 15:37:56 +0200, Antonin Houska wrote: > Andres Freund wrote: > > > On 2026-04-12 15:31:20 +0200, Mihail Nikalayeu wrote: > > > Instead of cancelling the backend entered the deadlock detector - it > > > cancel some another (nearest hard edge) until it is possible to get the > > > lock (either by > > > reordering or directly). > > > > I don't think that's as good. The problem is that that way you're only > > detecting the deadlocks once they have materialized (i.e. once repack actually > > does the lock upgrade), rather than cancelling when we know that the problem > > starts. > > This is my hack that tries to do that. I still think this needs to be in the deadlock detector. The lock cycle just needs to be a bit more complicated for a hack in JoinWaitQueue not to work. There's no guarantee that the wait that triggers the deadlock is actually on the relation being repacked. Greetings, Andres Freund