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 1vRpzz-006Hu9-1c for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Dec 2025 10:58:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vRpzy-00BRcF-0b for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Dec 2025 10:58:46 +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 1vRpzx-00BRc6-2f for pgsql-hackers@lists.postgresql.org; Sat, 06 Dec 2025 10:58:46 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vRpzv-003S2g-1Z for pgsql-hackers@lists.postgresql.org; Sat, 06 Dec 2025 10:58:45 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 3CF597A0120; Sat, 6 Dec 2025 05:58:40 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Sat, 06 Dec 2025 05:58:40 -0500 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=1765018720; x=1765105120; bh=T 3pIezuP3Biqe7qldfjZsqkg/OnpdQiDBGjuiCVz6oY=; b=CtVbF+hUtgM3Tzw5l bdEHbAbKDB+LcAyrRKlx1bj5jD2zxWAv3kSTdBYaAGSl0eZME2jwJwargYMonojl jRFxb2V/EZxgqJxHyHIrX4nr1McUvtOFBGrgwG7ucAI/EytgYc9k3Xk4+WHe8ODr D2aKdZqWsHL4kqmJcclevvitV+chFynAwuMInLyEnV4K3rGbxkGF/oGwd76rKsSU uViT/5JV+jemgI2jVCSPgeyo+maYpeCshMa7zfYweyRONj4QfHBoV0HDrVBzgL4+ xNywUJW+mnZMXLyOBCjT0vSXg7FzArKWzQF1ui/pZLzreHXgGI5hOpNgIVR0rMXQ MHcKQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdejiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpemllhhvrghrohcu jfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenuc ggtffrrghtthgvrhhnpedvheeuffehgfeukeeufeehhefghfeugfefudekjeevudffgeff keegffffveegheenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghr rhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtghpthhtohepjedpmhhouggvpe hsmhhtphhouhhtpdhrtghpthhtohepuggrvhhiugdrkhhlihhkrgesrghtlhgrshdrtgii pdhrtghpthhtoheprghhsegthigsvghrthgvtgdrrghtpdhrtghpthhtohepmhgrrhgtoh hssehfuddtrdgtohhmrdgsrhdprhgtphhtthhopehjihgrnhdruhhnihhvvghrshgrlhhi thihsehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhhihhgrihhlnhhikhgrlhgrhigvuh esghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhs thhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehrohgsseigiihilhhlrg drnhgvth X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 6 Dec 2025 05:58:38 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1765018716; bh=vQgNxHhEA1jobhtBJdYoPOdTjDQ0bNKeA0YjdQHs+PQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=IFIIjqPct86yEogG7AhGptyanjdVAeYAhCnBFtXpoiphS8r3uJWStAP9FxUEThiVM kTuhIBQuuwTsh8r2jjYbW8d9nrypNDZE89cZNBO1/3p7sflworqVgCkSF665FrsyCB /HuX201nchkVkWAKll114MXt84C6Uh9VGyEH4v+sSjCJKs7HzwBxLuFXJKPQKZPP5V ViqAPEXuddoo4TnPlJFVEbM5KfTaM0buJo8IBUL5oC75nELBKsS5os5MaXBkYYgWeT 43JOT1E2CZ2RXU6R6NtCnQLEakkm6YA40IQ1Kh4W5wXGMoDjL99x82fsjjkgp+hEHF JgbezYBX5/bRA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id C625C7A; Sat, 06 Dec 2025 11:58:36 +0100 (CET) Date: Sat, 6 Dec 2025 11:58:36 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Marcos Pegoraro Cc: David Klika , ah@cybertec.at, jian.universality@gmail.com, pgsql-hackers@lists.postgresql.org, mihailnikalayeu@gmail.com, rob@xzilla.net Subject: Re: Adding REPACK [concurrently] Message-ID: <202512041802.gzsr3v644a5l@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 Hello, On 2025-Dec-04, Marcos Pegoraro wrote: > Em qui., 4 de dez. de 2025 às 12:43, Álvaro Herrera > escreveu: > > > So if you're trying to do this, the number of problematic pages must > > be large. > > Not necessarily. I have some tables where I like to use CLUSTER every > 2 or 3 months, to reorganize the data based on an index and > consequently load fewer pages with each call. These tables don't have > more than 2 or 3% of dead records, but they are quite disorganized > from the point of view of that index, since the inserted and updated > records don't follow the order I determined. I don't understand what does this have to do with what David was proposing. I mean, you're right: if all you want is to CLUSTER, you may not have an enormous number of pages to get rid of. But how can you use the technique he proposes to deal with reordering tuples? If you just move the tuples from the end of the table to where some random hole has appeared, you've not clustered the table at all. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "People get annoyed when you try to debug them." (Larry Wall)