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 1w9rzQ-001qCq-1V for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 22:00:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w9rzP-00CL7V-03 for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Apr 2026 22:00:11 +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 1w9rzO-00CL7N-29 for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 22:00:11 +0000 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w9rzM-00000000yQE-0Lxg for pgsql-hackers@lists.postgresql.org; Mon, 06 Apr 2026 22:00:10 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3E07E14001DD; Mon, 6 Apr 2026 18:00:06 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Mon, 06 Apr 2026 18:00:06 -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=1775512806; x=1775599206; bh=t BQRRwwiCw0YPYNq97Ry7eBH6pFG+6apS19eQQT9DJ0=; b=KDFtR8790teqiTbka rXEsHW4DK8CGtzNvq8iHkeSAoTj6oEML5KWbPC57D7zSqxmFJEQLLTrq4jmEN1H6 SLpuNDRckbaLOJEAKzzCQGCutZyACXGdQRWdyqVTmlLkEnTUoQ3JJbyDmUfutCTd lb6tlm1jgUtEXTlHD7xZuKxsyab2S2J1XvKmp1LmIREM/J2gzB/f1Om+wEsNJ1mY fmTKR5bipEcdg4ytlMwNj/jVH/fZNtvnfrb+wt0oaxu01/hrGJp+9dwghP3LM27H UrXF8A5oFu5up9eg9885CtXmHAKwt3zPIw/fSgLVDId/uBCjap0owMWr2KpQWlYN 5G3JA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddukeekkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghrohcu jfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenuc ggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeejkeffgfdu fffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghr rhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtghpthhtohepuddtpdhmohguvg epshhmthhpohhuthdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghlrdguvgdp rhgtphhtthhopegrhhestgihsggvrhhtvggtrdgrthdprhgtphhtthhopegrmhhithdrkh grphhilhgrudeisehgmhgrihhlrdgtohhmpdhrtghpthhtohepsghovghkvgifuhhrmhdo phhoshhtghhrvghssehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhhihhgrihhlnhhikh grlhgrhigvuhesghhmrghilhdrtghomhdprhgtphhtthhopehsrhhinhgrthhhvddufeef sehgmhgrihhlrdgtohhmpdhrtghpthhtohepvhhighhnvghshhdvudesghhmrghilhdrtg homhdprhgtphhtthhopehnohgrhheslhgvrggusghorghtrdgtohhmpdhrtghpthhtohep phhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Apr 2026 18:00:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1775512799; bh=GMNeUol+cbGIZeWY1q41BDN7ofLSqLUV3ldQwUljZNA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ZIho7f4hs76jOqO3oEZlQbzDFApPpXUEka7CxBSGRN6yxgSWaj7dohZYsSLbpKs3l OMbonrM1/1DhEZs4uLvP3N5qB6ysUHsP7H5koU0KKOJHNglTEs3LHAuAlOgSyndOYT x7rMtHCj+zMlaomQ22z2q2+4fub6jDA0ZDQ/oWAA3wdqFH6Q2UfcVzIvQ+b5uxqMx2 q+bV8LDR66sJ2diRNl31DZVmcv8LH2nmYy1O1jZOfLkHpz+AqIIViXUyQox1fJxvD2 uM4Tw/Weu0t2J0SrY9DDJlTWEjLmsw4i6G/NiawYOQgk4rhvlWGJeMP/P7fyK9jyjd NMDzdNiA6s0AA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id CACAB7C; Mon, 06 Apr 2026 23:59:59 +0200 (CEST) Date: Mon, 6 Apr 2026 23:59:59 +0200 From: Alvaro Herrera To: Andres Freund Cc: Noah Misch , vignesh C , Antonin Houska , Srinath Reddy Sadipiralla , Amit Kapila , Mihail Nikalayeu , Matthias van de Meent , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] Message-ID: <202604062121.ijkompbo4ezj@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-Apr-06, Andres Freund wrote: > I just saw this got committed and wanted to briefly play with it. It works > nicely! Yeah, I have to say that Antonin did a great job here. > Except that at first I tried this in a debugging build, and was briefly rather > dismayed by the performance. It was really slow. But it's not really related > to repack / the patches here. > > In that config, the assert single-handled increases the time for a repack by > 35% or so. Yeah, I saw it was kinda sluggish, but wow, I didn't see *that* much overhead. > It's totally valid to not have done so initially, this is a quite complicated > feature: > > I saw this is using individual heap_insert()s during the > heapam_relation_copy_for_cluster(). Doing individual WAL logged inserts isn't > exactly cheap or efficient from a WAL volume perspective... > > Is there anything other than round tuits preventing us from using > multi_insert? > > That actually would also reduce the cost in the REPACK decoding worker, due to > having to parse far fewer WAL records. Nope, not really ... but I don't have any :-( -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/