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 1w5tuk-003jrI-2l for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 23:14:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5tui-006L06-0r for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 23:14:56 +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 1w5tuh-006Kzx-2y for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 23:14:56 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5tug-00000001DlH-1j9a for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 23:14:55 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 34506EC00F8; Thu, 26 Mar 2026 19:14:53 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Thu, 26 Mar 2026 19:14:53 -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=fm1; t=1774566893; x=1774653293; bh=X pyhXiIVjR6RaE320I3GRVanJn8n8ugDKBdw2GAIspk=; b=naKLBbX0ERW4eHLbq CwnDy/xDQ7zIUMMTKVqDTDHYMyI/K0F62Gcp5R+JTtmx2a17d2NQG7F0wqEERVSi 2cuFXFPWabmFIraDnt8xuJk/d1tr1uQQi29b3JnjIuz2BELfMgx07byRxSk6Xxqz 9PHwrXnQt2qzb2Pvgx6RG8ZxTOMbOk7EiK/drpxkOIJ8rFuReevHYT7tH3GDKlzE +viZm/e1mP64Xbb/Ap5/ChRqn3pAH4m5OOvBkCCqhOkXqpx4ASeE+j/CU/hB2aOo jk03W/zStLgw1TchF53kS4MbE7n/GYjF/BBILzqUDhSg6UOPNWCycbtassj+gXDz OlPRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvdekieekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeekfffg udffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgv rhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprhgtphhtthhopeeipdhmohguvg epshhmthhpohhuthdprhgtphhtthhopegrhhestgihsggvrhhtvggtrdgrthdprhgtphht thhopegsohgvkhgvfihurhhmodhpohhsthhgrhgvshesghhmrghilhdrtghomhdprhgtph htthhopehmihhhrghilhhnihhkrghlrgihvghusehgmhgrihhlrdgtohhmpdhrtghpthht ohepshhrihhnrghthhdvudeffeesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqh hlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphht thhopehrohgsseigiihilhhlrgdrnhgvth X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Mar 2026 19:14:52 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1774566890; bh=q4fH+ul/LfVFZ3gTK6xJ3pn8qJ7eZ+jnw3s5iz6K/tU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Nd5Dg6NXZYQkKXN1kC31TAQzlOoFvZh5pGzH+z7rdOGraBfEj80dZaD8QrrUJQS1C 2kxAogKrgBS2bK8unDZx5chnvZMJTTJKibcuy2+69Dga1Kd3qcq4vq8FMVS/YNDlVH iRrz4cavYyuB4vO7O66lp4a4pqm5Z0owSgby2hcBV6uKfHjZmWiHQc+Khs6XAbkMJa LxLNLJfQuQXMAguKiVH4nd5daaojP+9uEYh0O7FGO1J1jEWPQzzbfRM2biCIzNDStl UOYZFGGFw7nBCtNpfWmKAlrYJopsO+2lm+JhXwD5hMjspD6V0ZzqQtM2PVHgus5oaA oAxbg2SDNKJDA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 97CA17C; Fri, 27 Mar 2026 00:14:50 +0100 (CET) Date: Fri, 27 Mar 2026 00:14:50 +0100 From: Alvaro Herrera To: Antonin Houska Cc: Srinath Reddy Sadipiralla , Mihail Nikalayeu , Matthias van de Meent , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] Message-ID: <202603262307.gfa5jbpesfro@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <23138.1774518710@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Mar-26, Antonin Houska wrote: > I haven't thought of it because I'm not familiar with the deadlock detector, > but what you do seems consistent with the way blocking by autovacuum is > handled. > > The only problem I noticed is that PROC_IN_CONCURRENT_REPACK is not cleared at > the end of transaction. Perhaps it should be added to PROC_VACUUM_STATE_MASK > (name of which is already misleading due to the presence of PROC_IN_SAFE_IC, > but that's another problem). Yeah, good observation -- we should absolutely clear it at transaction end, and adding it to PROC_VACUUM_STATE_MASK seems the cleanest way to make that happen. However, we should also clear it as soon as we've acquired the AccessExclusiveLock on all rels. At that point we no longer need it, and it makes more sense to have other transactions resume the normal waiting behavior instead of having them fail right away. > Maybe just add a new permutation to repack.spec? I don't remembery if I > created repack_toast.spec as a separate file just for better readability or if > there was some other issue, but the deadlock test might fit into repack.spec. Yeah, that was my first impulse too, but it's not clear to me that things are better one way or the other. I haven't decided yet. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "[PostgreSQL] is a great group; in my opinion it is THE best open source development communities in existence anywhere." (Lamar Owen)