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 1w7dl2-005YI1-1o for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 18:24:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7dl1-00CHFG-0M for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 18:24: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.96) (envelope-from ) id 1w7dl0-00CHF8-1f for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2026 18:24:07 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w7dkx-00000002DXO-1Pqq for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2026 18:24:06 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 33029EC00E5; Tue, 31 Mar 2026 14:24:01 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 31 Mar 2026 14:24:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1774981441; x=1775067841; bh=C TwLAz8+RQ7j17y4pZ7Yek4ZfI7x9UB3VkSsaEgUedc=; b=G91wx8HLw2CXJUD9x 3iRP477y21agVQmOYucJPDMY+tfYf62E/F9h8dh+Is28S6Wb83469kC680TikglE WopSGisxw7SixXgSUpabMhbdNYdaZil82+GSwzen/rwEH+qQVMmmqAFVo/JDXSNw w/4rh7yFMM56pqLogNSBSiWi91VUWIcepY9Y+4jlekWXEenDBN4M/tfY++SKHu95 p1hdosyENTd+70l74TaOLu0QWYmVb4MrAoGncsbW1dGLaPkyZWhRrgjJ1Mtn4f1e w51yM1IaF4DJvU/u+l9KTlkak1zZkqgGG2MEwfM7RFssGrvRuCYWrCp0cbgBG+qA esRxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdeludcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegrihhl ohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpe ffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghrohcujfgv rhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtf frrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeejkeffgfdufffh udffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv segrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtghpthhtohepiedpmhhouggvpehsmh htphhouhhtpdhrtghpthhtoheprghhsegthigsvghrthgvtgdrrghtpdhrtghpthhtohep sghovghkvgifuhhrmhdophhoshhtghhrvghssehgmhgrihhlrdgtohhmpdhrtghpthhtoh epmhhihhgrihhlnhhikhgrlhgrhigvuhesghhmrghilhdrtghomhdprhgtphhtthhopehs rhhinhgrthhhvddufeefsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhh grtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohep rhhosgesgiiiihhllhgrrdhnvght X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 31 Mar 2026 14:24:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1774981437; bh=BdqhNLI3/pSG66atw6P9JXjJR5gETQPdD1cmC9plnGU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=QajQEPIvVe68K7OszyP4YhDrqXBqpuqE3yg06TmIcpH3fDnYb2suy0lbPeutNwh32 0oachamRlOmsPBPf4Q3hwePFeh2nzNX/jO8CQIAmB1wnmRoKYxJG9t1B2o8hBJMKBL e28bhJN/DAg4MXhTeW8rJTmVt7uz0N/sw4SVNJwR1YZQBQn3qvgPHJitN7o92jXGJF QQvilqrDRzGFY7ey74P4ZQeR76ek5UXUuus2/HHaBBNBO3txtdRNK14W4mW6mc8RIK Bdjsi4zDtZ9knBi6Wd5m5lJJnM8zJSCZreGFmlAuF/2/xoQCIhXsT9VoRCcGtUMfMe zOtS9DmC5HvqA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id C065658; Tue, 31 Mar 2026 20:23:57 +0200 (CEST) Date: Tue, 31 Mar 2026 20:23:57 +0200 From: Alvaro Herrera To: Srinath Reddy Sadipiralla Cc: Mihail Nikalayeu , Antonin Houska , Matthias van de Meent , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] Message-ID: <202603311819.3gvgmupluxh2@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Mar-31, Srinath Reddy Sadipiralla wrote: > In this case, there's no circular wait. The deadlock detector never > fires. REPACK simply queues behind the SELECT, eventually hits its > lock_timeout, aborts and cleans up.Initially, I thought this cleanup > was expected behavior. But after seeing your solution to protect > REPACK from losing its transient table work, I thought it's "not > expected". Yeah. Keep in mind that REPACK could have been running for many hours or even days before it reaches the point of acquiring its AEL lock to do the final swap; and it may well be critical work. We do not want to lose it. So whatever is waiting to obtain a lock on the table, or already has a lock on the table, has to yield. > If the goal is to prevent REPACK's work from being wasted, should we > error out the backend that is making REPACK wait during the final swap > phase? I am thinking of something conceptually similar to > ResolveRecoveryConflictWithLock, actively cancelling the conflicting > session to allow the AEL upgrade to proceed. Something like that might be appropriate, yeah. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "El miedo atento y previsor es la madre de la seguridad" (E. Burke)