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 1w8iG8-000nyD-1k for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 17:24:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8iG7-00Crls-0C for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 17:24:39 +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 1w8iG6-00Crlj-1i for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2026 17:24:39 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w8iG3-00000000PSb-1UrA for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2026 17:24:38 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 7B009EC02E4; Fri, 3 Apr 2026 13:24:33 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 03 Apr 2026 13:24:33 -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=1775237073; x=1775323473; bh=S 2swomI3lVklxIPtpePJdaDZK16Hcb62/GoqbzWg/tY=; b=KPDhQlTF8cfLvKpTa 9o2UgYB8TqBMfIpXgvkXAsgEGkwbI464zqDw4hhZAmwgQoNr8621sY6XhxyQO7Hn 4TszdkkMHRCPIscn5U7ER98NkIS0nkYA076A703MmvrjcQetiuuORlhPQneDf0v0 9RWi0ciOIagPDaaxVxiOQIcIx4/v3org3HPY7Givbnk2E0s+nhbJ0/xgvkRKRZJ5 RyNCQhNgBaxx8BeVw+bPZXNBSsEoEI9XZg9tSq0h9DelpII9kHhhOk7dbpEv4WX4 jpvwN4wZz14U5gHf4md/d5cO321v1OOVUO6Ez9/VO0RVsIPFI2CT1x4T5+1gGsx+ dhRgg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdelheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhhoucfj vghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqnecugg ftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeekfffgudff hfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenucevlh 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 13:24:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1775237070; bh=wwrvojNWgcAn6nKVPurbJ75XUuH18Tn9QPrQTHKe//w=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ngm4GYsI5z7Y5Npt/Ctgiy1yYfytth1JltnSqITreh/TsqpP0KH1n8LpeOiSsRb4e 4UVvktgQZBmq4f6z2ao6anlHCg99lzPoo+90oMVzo5NVMTL9MANAbDO1kz7LXVl3mS B6uBkRWWZaV58bjJ8w5Hl7MhqTrdUfDas+OEXmdv7O9UHImam5VY/ikVjn/Y+Ze0wH /RNVKJF8cH5VDjJQlycNGYnyKPtnB9vfQQCzqIP2I6Z+6GsXlon5ug/t0M9m4tnYFu 8XsCFSeG8Ved7enst1iOd57p2Or+5TSWpgvmekz0uLjPwuZFu9JlI8I9pNEZmoAwFL ShrhbuViKD4+w== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id AEC467C; Fri, 03 Apr 2026 19:24:30 +0200 (CEST) Date: Fri, 3 Apr 2026 19:24:30 +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: <202604031712.bqmynktpnakw@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <90475.1775218118@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Apr-03, Antonin Houska wrote: > diff --git a/src/backend/commands/repack_worker.c b/src/backend/commands/repack_worker.c > index 00b21ede481..c25dbeadff3 100644 > --- a/src/backend/commands/repack_worker.c > +++ b/src/backend/commands/repack_worker.c > @@ -233,6 +234,13 @@ repack_setup_logical_decoding(Oid relid) > > EnsureLogicalDecodingEnabled(); > > + /* > + * By declaring that our output plugin does not need shared catalogs, we > + * avoid waiting for completion of transactions running in other databases > + * than the one we're connected to. > + */ > + accessSharedCatalogsInDecoding = false; > + > /* > * Neither prepare_write nor do_write callback nor update_progress is > * useful for us. I find this reliance on a global variable for this a bit icky. Would it work to instead change the CreateInitDecodingContext() signature, so that instead of "bool need_full_snapshot" it has a three-valued boolean to distinguish the two cases from the original plus this new one? I think the value could be stored in LogicalDecodingContext, from where standby_decode() could obtain it. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "The important things in the world are problems with society that we don't understand at all. The machines will become more complicated but they won't be more complicated than the societies that run them." (Freeman Dyson)