Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nz6hS-0004EQ-Gs for pgsql-bugs@arkaria.postgresql.org; Thu, 09 Jun 2022 01:11:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nz6hP-0004JO-Vt for pgsql-bugs@arkaria.postgresql.org; Thu, 09 Jun 2022 01:10:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nz6hP-0004JF-N5 for pgsql-bugs@lists.postgresql.org; Thu, 09 Jun 2022 01:10:59 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nz6hN-0003eF-9d for pgsql-bugs@lists.postgresql.org; Thu, 09 Jun 2022 01:10:59 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 261465C00EC; Wed, 8 Jun 2022 21:10:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 08 Jun 2022 21:10:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1654737056; x=1654823456; bh=077xBf+3aO CZyyXLenT/a97lPKNYYvs4XuqpPLKl1ME=; b=pz6zZYWCl7bbyAWGZB8lNNFRqD V49gRCv3aGJQq12qbGhIyDM6SFYG6Dns9ExHSdUissBdJa1ioUUsLf/tlLIKKZxF zaR22NpTDxw0KwYupXFsiy3Y4QzF3pt6i9PynEGkVhlJxywhtXT9ZdaNUI3cRNWw tZ/+mmpA4AmUBg0q/TAyjWaqVm/+EQzYfk4pFHje/1bubbq9M4mI54BxeJeRz+/n MVNmH/fqF8bxYcD3RfOpyhdRa11wBiHUsl2IjgK/Q6yJJGO4C6e++qMTZ3rGiCpH U/6Jt675H4Md6TaDNpRloWuZu2L4QeQRdOQ3Mn/JZtxe2BZMDimLRPuaWcuQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1654737056; x=1654823456; bh=077xBf+3aOCZyyXLenT/a97lPKNY Yvs4XuqpPLKl1ME=; b=rk2lUtGYWwYf3eRkdvZGul0sgNY54/9SHCvK2OBebV+C GgczwyFN8crNnZcsg9Bjl7/uRWbJ6ZTzKgfDfMNedjaz52qMJDXRKrCkLj5AyWTW vbTeEVd1b9McBn9xCepCgggDdCBDVj7Khu75DTqSGJ9MnRwOVg2+XHzpMmbNnUvG IDt1T5QtQsQXMlvVHjBlSjzg5NlvpGyQrVF82xoZyWPy2HCn6W6Qzxn3OtfPhIlb cuyePeOPbc0/bAV8SAW5oAPR+dnRsd1AW8/Lu4VITZlaobXp/TbbmX21gqdmVzN8 tzCFRodiyVg161JIENPDxUySS6bAJiLAu7jetaHWzw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddtkedggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepgeffjeevgfevuddvjedtvddt ieejheduueelvddufedtgfefjedvkeevkeeivddvnecuffhomhgrihhnpehpohhsthhgrh gvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Jun 2022 21:10:54 -0400 (EDT) Date: Thu, 9 Jun 2022 10:10:52 +0900 From: Michael Paquier To: "David G. Johnston" Cc: kg.postgresql@olympiakos.com, PostgreSQL mailing lists Subject: Re: BUG #17513: recompressing already-compressed data via VACUUM FULL or CLUSTER does not work Message-ID: References: <17513-fe70a8ef15de3e76@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="S4WGeK2+PtQGbd7r" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --S4WGeK2+PtQGbd7r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jun 08, 2022 at 03:59:51PM -0700, David G. Johnston wrote: > The described behavior didn't even make it into 14.0; and I have no clue > where such a thing would be documented to guess if the lack was intentional > or not. I can confirm that as of today the behavior in HEAD is to not > decompress and recompress during rewrite. Frankly, this seems like the > expected behavior absent any documentation to the contrary. Whether there > is a use case for someone to code up a way to get a recompression to happen > is another matter. Oddly, I kinda expected that "update cmdata set f1 = > f1;" might do it but alas it does not (...set f1 = f1 || ''... works; I'm > not quite sure how much worse that, immediately followed by vacuum full, > would be compared to whatever it would take to do it all during the full > vacuum...especially if one is changing every single row on the table). See commit dbab0c0 about the reasons of this choice, with this thread: https://www.postgresql.org/message-id/20210527003144.xxqppojoiwurc2iz@alap3.anarazel.de The docs of ALTER TABLE .. SET COMPRESSION include a note on the matter: https://www.postgresql.org/docs/14/sql-altertable.html "This does not cause the table to be rewritten, so existing data may still be compressed with other compression methods." -- Michael --S4WGeK2+PtQGbd7r Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmKhSJwACgkQnvQgOdby QH0uBQ/+MxR//YnTX1gQtXeG3Rl+R0zLKp890RlxB6IDm3oA8vVe9Yvi2QaUsG2E FXDgpxLvk+ouYkoHFUMQ/r9ieT53fqwzMERblhrkBi7iOUM6yVUA8GWpia37TWvw dXJ3P85MpKeN7amFSbRO/j/JDQF3ArOxLFpGVB/7ivxnrzQDApXzS1Czg42Qytye DGM4bTyb75sul2Ka38ut+VkECHICIX7ENhlnh3ghZtxmVtpNN57l+iHtYB5CnSRD xaXeKn5x//EdjJQHp8s5+HzYd/iDQIVAqaNWwsl2eqr8zQSpsEHBkZe/4ohmHuvY dnJosNzxTJZoxkthFZ4Amuwkuj/11H29gZJqSCiz3xA9Uaw0wgJjR8akk1ykZy1D f/Y9JZx1xlcXpdUCewrhrujGWtkYGKpN8AGJOenkvaVeRfknqagbil/Kvk6gYQjM m/5pxi/ggtipD/GctStEeZFhSVaCsZUcZodzobxm79NwzV9mxHYw3ChYGJMcwncp c7VBkyjSqZMznhHjmtdbiFfxNRauBs0HHsGP7qNn/L7jRyHAPGHcv34Sdoc1DlqI /0Bpm72gvMKgoJEp+FohWS+N6ZUoOB4lChBI6Rm+qOKx2cZ/NPXctEib/uxYWKJT GpOFcHVPN9lkLlvNVJMibbUZ/Hh40vMtCZxfc56eiaD7T1lgnkE= =EIZe -----END PGP SIGNATURE----- --S4WGeK2+PtQGbd7r--