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.94.2) (envelope-from ) id 1uoLMf-002UOS-3J for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Aug 2025 12:22:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uoLMe-00AmRR-EQ for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Aug 2025 12:22:57 +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.94.2) (envelope-from ) id 1uoLMd-00AmRI-Uq for pgsql-hackers@lists.postgresql.org; Tue, 19 Aug 2025 12:22:56 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uoLMb-000hjI-0Z for pgsql-hackers@lists.postgresql.org; Tue, 19 Aug 2025 12:22:56 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 4D58C7A02AD; Tue, 19 Aug 2025 08:22:50 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 19 Aug 2025 08:22:50 -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=fm3; t=1755606170; x=1755692570; bh=F CmrCWQFLP2pAm/cbiMPXHpbf/jgqnxStMqVdMWEA/A=; b=K7BmfKNn2df5Xm3N3 +2sQo4XRjodslom0+5Jwi1Ep1NctNAjpRuVYlraVRBiY7XVQEx2FoUAe/mawjI03 OlmsZItZKy6GEN2qWxk/W9cvgug93g7njaxMwRYchTjZLYPxbu7V3otSFO/5lNHA nBiX/H66K4JHl39MpGVPL9upYcwZlmj3Q36PEOMhO/cpQ89SfmoF1bto33htxWFb CUYdS8XDo43+rxTCek+ko2nrBnSedMwfcuT4sE406EEcdjY7o9790mjpieAYT1zk C6ro60texYjktiNZ65dROCUjkDaEyRT8LZf8BaHeJ4fo9+qD05K6cshN3jQQApdr UvN4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduheehgeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeekfffg udffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgv rhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprhgtphhtthhopeefpdhmohguvg epshhmthhpohhuthdprhgtphhtthhopegrhhestgihsggvrhhtvggtrdgrthdprhgtphht thhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdroh hrghdprhgtphhtthhopehrohgsseigiihilhhlrgdrnhgvth X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Aug 2025 08:22:49 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1755606167; bh=rgObuyF81QL481cQO+JhSBTqBYZCea0UE98FnlNAxYU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=b4NNR8OShc1PIc03OY7FP/eOcXrwmOBOGgS9VmlksF2L/VaJK4ErfX8aWh9T21EJ5 McR+N9+VymSqBHhyYUWzpH3Y67WrBH/rPemKCEOAGo8qzkdS6gYtNYJ8Fi6YTlZlIt 6lqS98ELvoaGNcuwgm6PpsipxJoAFoduSD+jCnmiDMuEGraX/H4tQ5HA2oDj++WpSI hQEWCiz17AZ+9KC7646zRqccuVxbDy+MMWIk800TP4PPddPikdYGGmEXfl6nhSp1Up J+Z0Sn9sZTfae+z1NuVJmwSYG64RgdRudRKo4hpmLAu0TCP3Kq6bZ1qmZbssXdrDtF ANzgtSV35/DAg== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 704B190; Tue, 19 Aug 2025 14:22:47 +0200 (CEST) Date: Tue, 19 Aug 2025 14:22:47 +0200 From: Alvaro Herrera To: Robert Treat Cc: Antonin Houska , Pg Hackers Subject: Re: Adding REPACK [concurrently] Message-ID: <202508191222.ghumvyzw4cmj@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 2025-Aug-16, Robert Treat wrote: > On Tue, Aug 5, 2025 at 4:59 AM Antonin Houska wrote: > > Now that we want to cover the CLUSTER/VACUUM FULL completely, I've checked the > > options of VACUUM FULL. I found two items not supported by REPACK (but also > > not supported by by CLUSTER): ANALYZE and SKIP_DATABASE_STATS. Maybe just > > let's mention that in the user documentation of REPACK? > > I would note that both pg_repack and pg_squeeze analyze by default, > and running "vacuum full analyze" is the recommended behavior, so not > having analyze included is a step backwards. Make sense to add ANALYZE as an option to repack, yeah. So if I repack a single table with REPACK (ANALYZE) table USING INDEX; then do you expect that this would first cluster the table under AccessExclusiveLock, then release the lock to do the analyze step, or would the analyze be done under the same lock? This is significant for a query that starts while repack is running, because if we release the AEL then the query is planned when there are no stats for the table, which might be bad. I think the time to run the analyze step should be considerable shorter than the time to run the repacking step, so running both together under the same lock should be okay. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Computing is too important to be left to men." (Karen Spärck Jones)