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 1rUlOo-00Ctrq-Kh for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jan 2024 10:31:27 +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 1rUlOn-004DtT-Lb for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jan 2024 10:31:25 +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 1rUlOn-004DtL-1i for pgsql-hackers@lists.postgresql.org; Tue, 30 Jan 2024 10:31:25 +0000 Received: from fhigh5-smtp.messagingengine.com ([103.168.172.156]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rUlOk-004VSH-5w for pgsql-hackers@postgresql.org; Tue, 30 Jan 2024 10:31:24 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.nyi.internal (Postfix) with ESMTP id C830F114008D; Tue, 30 Jan 2024 05:31:19 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 30 Jan 2024 05:31:19 -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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706610679; x= 1706697079; bh=nvL9T6DLpeW0pHkdQ34y03IcuMA+ev9BnyQvHDMZVtk=; b=x GtjHuWRcLOtl7/ohQfbWiK7FM91i7M4wnIrWSYHjt0CW7F/vcg9yvwG89mHmuffm IR6SxbpDzy8OHW4jv9X0Lpafqq7kfaM4Armqv+u/VULzAuCSOwZemQspizrVuP/T V3obQj+MPE/kwMVMi0I8r0PbBL1g1u+cq6PjwqEig1EbPvLTST7X1rG6Y8CBbSS5 qrl9jebZ4oGWkpXG6UUZOYW3iSYOCrYxgyoXZoupsUHWrQEBTAJc5hV88ru7sjGl KjdXCDwSCcH2xcM97+ELxmKFvkVqyaHYcGLNqeuwWCrQdSOiMs905PCXRR3+y4+q VElZcgVVl3SnxquKeHpYw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedtiedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Jan 2024 05:31:19 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1706610677; bh=02cJRNSDpTtfC/msagEiin4j1g4zzyL6SV+6qEsnouM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=fDyu6s8qsuP5DpxbDVoG4VAfYIP778RAqWBA/vmrn2oyr9RSNgh1Uo+nQziTBKyW/ nGGKhwEzkp5WJqyb/q5fOAyRF/WrGvoRFUnTsF6M2XZk+rucVqgI8piR0/xj1UF8dB vDeat7IoT2wZKIzJZ9RQ4qPRWWAU+x+se4U9tOHRb/JZsOW/ifQKL1NNhzl0mL3cXs 0ymGqNPO5O7z3qzEjH7MSpABKgnAZu2J5kbF9BEk6nYJkibDEEj4xK+USuLuqwKM22 4mf8p3CngcHE+EYdQfW/cHqgxOo5iQjsVieO+nB32aigJuKC2gojPu9fXpqgR1i194 Rroj/tLG1SS1A== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id E1EE18B; Tue, 30 Jan 2024 11:31:17 +0100 (CET) Date: Tue, 30 Jan 2024 11:31:17 +0100 From: Alvaro Herrera To: Pavel Stehule Cc: Michael Paquier , PostgreSQL Hackers Subject: Re: why there is not VACUUM FULL CONCURRENTLY? Message-ID: <202401301031.7viyzjhkmal4@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 2024-Jan-30, Pavel Stehule wrote: > One of my customer today is reducing one table from 140GB to 20GB. Now he > is able to run archiving. He should play with pg_repack, and it is working > well today, but I ask myself, what pg_repack does not be hard to do > internally because it should be done for REINDEX CONCURRENTLY. This is not > a common task, and not will be, but on the other hand, it can be nice to > have feature, and maybe not too hard to implement today. But I didn't try it FWIW a newer, more modern and more trustworthy alternative to pg_repack is pg_squeeze, which I discovered almost by random chance, and soon discovered I liked it much more. So thinking about your question, I think it might be possible to integrate a tool that works like pg_squeeze, such that it runs when VACUUM is invoked -- either under some new option, or just replace the code under FULL, not sure. If the Cybertec people allows it, we could just grab the pg_squeeze code and add it to the things that VACUUM can run. Now, pg_squeeze has some additional features, such as periodic "squeezing" of tables. In a first attempt, for simplicity, I would leave that stuff out and just allow it to run from the user invoking it, and then have the command to do a single run. (The scheduling features could be added later, or somehow integrated into autovacuum, or maybe something else.) -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "We're here to devour each other alive" (Hobbes)