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 1wAqKx-000RUh-0t for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Apr 2026 14:26:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wAqKv-0061b2-0k for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Apr 2026 14:26:26 +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 1wAqKu-0061au-32 for pgsql-hackers@lists.postgresql.org; Thu, 09 Apr 2026 14:26:25 +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 1wAqKt-00000000Azt-2hOT for pgsql-hackers@lists.postgresql.org; Thu, 09 Apr 2026 14:26:24 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 1A7067A02BB; Thu, 9 Apr 2026 10:26:23 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 09 Apr 2026 10:26:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding: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=1775744782; x=1775831182; bh=RyXvApc8Rltk7pg0aHIKcZeuPuVRblFIADoS9srmHVc=; b= kX4APgHNlnK5tAUB1vUw7hCpe1u37t5TGoKgprcuplJEWLUyvXJ8yP84CsrS//Wq hxZBCbVtCWGvj7tsUh4tAM1LdbHmNK9mOlr97GcY/EfFX6EipFmifmgyvSQgE0zl ami/eEX8d6GVdKceK9iKQAshW4AAcHqQL6L/+Bt9HUyhekgSUOdKDhkE2Sp+Rev7 3Z/d+xmnp3GFlkkvsdEe9sn+PccR0U+6yZrkYUmtQN8t/oEZg9o7Y5y1fJU1dF5m q130happBi8H7cmj4gj5I45JmyV7aj9JGmpHm+JspKxuOk5ufcAUWTRSDS24k9am ZmNcsow9CeLo26oodueFcA== 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 :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1775744782; x= 1775831182; bh=RyXvApc8Rltk7pg0aHIKcZeuPuVRblFIADoS9srmHVc=; b=L Aj4oHx0oZDxYOPjELegCgn90Pht1mkcNlNYOBu15VBHNmdLiFXcm0f0sY643wP2E KnUr515Wt/4bxwj8NUlCrFFq38hNOCwe0ScI+RENlIehW0AdjriGbtHNYJ0NWn6q GPJtJq/QZsy81C9cXQ2WP5pCuNoTTq1sQuX7TsXdHhvSm+oOWbJgtGTeC2SIO7U0 RxLmdqtDBe9Trvn67SWLKX/5gA+l+GZTgTLnB1QQ7htcg3Z5YLPYUv/VHbVvt/C/ DiUuBnVmpMIUyipix+c5x35y0fmIUa5QTtrjm+qwXLO55pzvK0dsB1WBVlU8f/Aw ScK83G8Eug5wfrB0kWoCw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddvieejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtugfgjgestheksfdttddtjeenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepleeugfeugeefvedvtddttdeigeevleektefgueehhfdvhfeuteduhefhtdfg gfeinecuffhomhgrihhnpehpohhsthhgrhdrvghsnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdruggv pdhnsggprhgtphhtthhopeekpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrlh hvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhrtghpthhtoheprghhsegthigs vghrthgvtgdrrghtpdhrtghpthhtoheprghmihhtrdhkrghpihhlrgduieesghhmrghilh drtghomhdprhgtphhtthhopegsohgvkhgvfihurhhmodhpohhsthhgrhgvshesghhmrghi lhdrtghomhdprhgtphhtthhopehmihhhrghilhhnihhkrghlrgihvghusehgmhgrihhlrd gtohhmpdhrtghpthhtohepshhrihhnrghthhdvudeffeesghhmrghilhdrtghomhdprhgt phhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlh drohhrghdprhgtphhtthhopehrohgsseigiihilhhlrgdrnhgvth X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Apr 2026 10:26:22 -0400 (EDT) Date: Thu, 9 Apr 2026 10:26:22 -0400 From: Andres Freund To: Mihail Nikalayeu Cc: Antonin Houska , Amit Kapila , Alvaro Herrera , Srinath Reddy Sadipiralla , Matthias van de Meent , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] Message-ID: References: <202604062213.cgo352cdsgsm@alvherre.pgsql> <4n4q3preb3lgyhpzstebhux7b2aojhsw7gik4ivaznyggiezrs@lrznutssxlh2> <9539.1775724194@localhost> <10697.1775726789@localhost> 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 Hi, On 2026-04-09 16:06:17 +0200, Mihail Nikalayeu wrote: > On Thu, Apr 9, 2026 at 11:26 AM Antonin Houska wrote: > > Sure, it's possible, but IMO the principal question is whether REPACK should > > let VACUUM and DDLs error out, or just let them wait. > > One more idea: instead of ERROR in CheckTableNotInUse in case of > in_repack - just release the lock and retry a little later (by that > time, the repack operation will likely have acquired the AEL). I continue to think this approach has no chance of working. Even if it theoretically could, there are lots of paths to locking relations that do not go through CheckTableNotInUse(), and we're not going to just route them all through CheckTableNotInUse(). What CheckTableNotInUse() is for is to prevent DDL from changing the structure of the table when it is still being referred to. You can't just call CheckTableNotInUse() from a LOCK TABLE - it would trigger wrong errors *ALL THE TIME* because a LOCK TABLE does not need to error out just because there's also a cursor on the table. And it'd trigger lots of bogus errors. See the first example in https://postgr.es/m/fpr4nsmyy3mpfrm2mijspr44dgol2cjeke5tyznb4btsznxsgx%40iifdbfe2wl63 S2 would get the lock and then error out due to the proposed check. Even though there's no need for it. Greetings, Andres Freund