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 1w8kFQ-000ptm-0T for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 19:32:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8kFN-00Df10-2n for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 19:32:02 +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 1w8kFM-00Df0X-2Z for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2026 19:32:01 +0000 Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w8kFE-00000000PFp-2eUS for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2026 19:32:00 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 5A2CDEC01B0; Fri, 3 Apr 2026 15:31:51 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 03 Apr 2026 15:31:51 -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=1775244711; x=1775331111; bh=G 7EAF6yxfQF4Vh0qZ6HnyU23E4q2iWCC/sZZzZXQg3M=; b=Ab5b6ChZTAqaGrkzo YjSjyALFTuN25YgUfyCS6ObHBVhGZzDQnsZotqsLobY1Em//R5lNqyyr8ggXTtuB u5eMTnNbByftzbIA1gZMYi6MlcLKaW0eTP8DngwxNgc3sRhuTlK/kLeWg78Z3yx3 hTjPfGOIB+iTbsyHsabvvjkhOXa76QcppS8opFnR4wQCIDvnQ27BT/BzLAITA/xA RK+o4J/DPwo7AKsVaTJXAKBM2lzapUbRN5/h4WES6Le5RQd14vEpfWfjrquZ+y6X mjjUBlN6V12rK3elZYQhcc5mj3uZWD7ie0IBWv+BzHeRICHqbTZJcFRtdjhFqpAQ Sp/Og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdeljeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epfffhvfevuffkgggtugfgjgesmhekreertddtjeenucfhrhhomheptehlvhgrrhhoucfj vghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqnecugg ftrfgrthhtvghrnhepudelkeekgfdttdettdekgfduvdeiffelteegjeeihfetheekveef tedtuddvhfeunecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhr vgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprhgtphhtthhopeejpdhmohguvgepsh hmthhpohhuthdprhgtphhtthhopegrhhestgihsggvrhhtvggtrdgrthdprhgtphhtthho pegrmhhithdrkhgrphhilhgrudeisehgmhgrihhlrdgtohhmpdhrtghpthhtohepsghovg hkvgifuhhrmhdophhoshhtghhrvghssehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhhi hhgrihhlnhhikhgrlhgrhigvuhesghhmrghilhdrtghomhdprhgtphhtthhopehsrhhinh grthhhvddufeefsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghk vghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtoheprhhosg esgiiiihhllhgrrdhnvght X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 Apr 2026 15:31:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1775244708; bh=8Si0cZYVf72z87Zbe9wnx3bxZ0mGUmvXKhcNjSzOQoM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=nQQbH/gNaglCP/Ifl0AnVJ+tWMWHTJCWcCn5wStKg31k1S6AWAdT75mhwWnb6WJux e+0zhoywoIBKi1zkIpxBdlchZECGHQOVFIiMOqiVpFWPFGVBrCVLDLUkzxIqBeMSFy omK+un6/ipAcyfPbzGmSD7+8dnUITxNz6YYqBDEKqQgyH4FthZmcFdwk08GpSEru8B mG5LaqlqSko87QSE6I26NOPCpmkWQZbhuJzpiOUFP+h2nDRDNUJfBPYhFAziYVbW+i MuywoGYAFizz0xjT+issmVdNUkheubnIT81LazvYWI0oBYoNeuuY80O07Do13Ry+Dk sEO+nKTLFp41g== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 19B387C; Fri, 03 Apr 2026 21:31:48 +0200 (CEST) Date: Fri, 3 Apr 2026 21:31:48 +0200 From: Alvaro Herrera To: Antonin Houska Cc: Srinath Reddy Sadipiralla , Amit Kapila , Mihail Nikalayeu , Matthias van de Meent , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] Message-ID: <202604031922.t6lgu5a2alwo@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="r2slln3zpmilwu22" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202604031448.3nakw63kxkmr@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --r2slln3zpmilwu22 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2026-Apr-03, Alvaro Herrera wrote: > - I polished the patch to reserve replication slots for REPACK. Given > the new implementation of 0006 that was submitted implies that we can > now run multiple repacks concurrently, I changed the default of 1 to 5. Srinath let me know that this new part was causing CI failures on Windows. This version v51 should be okay (or, at least, it passes for me on CI). Additional changes worth mentioning: - I think it's nicer for the index_create() API to get a bit to indicate suppression of progress reporting; so existing callers don't need to do anything. I guess this is mostly a matter of taste. - I incorporated Srinath's fix for the PreventInTransactionBlock block. - When CheckSlotRequirements() is to complain about "max_replication_slots or max_repack_replication_slots", it seems actually nicer to say exactly which one of these is the cause of the problem. This is easy to change; patch 0010 does it; it requires passing down a "repack" flag all the way from CheckLogicalDecodingRequirements() and it needs to add an argument to CreateInitDecodingContext(), which is perhaps not so great. On the whole I'm inclined to do it anyway, but I'm about equally happy to leave it alone. This is what would change: original: ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("replication slots can only be used if \"%s\" > 0 or \"%s\" > 0", - "max_replication_slots", "max_repack_replication_slots"))); patched: ereport(ERROR, + errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("replication slots can only be used if \"%s\" > 0", + repack ? "max_repack_replication_slots" : "max_replication_slots")); -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "This is a foot just waiting to be shot" (Andrew Dunstan) --r2slln3zpmilwu22 Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="v51-0001-Make-index_concurrently_create_copy-more-general.patch"