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 1wei8s-004xv9-1Q for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jun 2026 23:45:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wei8r-00Ac8Q-1A for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jun 2026 23:45:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wei8r-00Ac8H-0E for pgsql-hackers@lists.postgresql.org; Tue, 30 Jun 2026 23:45:25 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wei8p-00000000zWs-1Q2u for pgsql-hackers@postgresql.org; Tue, 30 Jun 2026 23:45:24 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 9EF2EEC00CA; Tue, 30 Jun 2026 19:45:22 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Tue, 30 Jun 2026 19:45:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1782863122; x=1782949522; bh=MVyUb/CgMk jbXoQP8bvcBHwFL1+PHmt7C33pwvqmEzM=; b=eo4VBlP2rjpctD6zMFbnkS5Y79 9u9s+9b2/rhuLV2660P+85R09ViKtPwmPWQL9t1EPKrj1zg0au3gV/IMbVSD2UrX XN1/Pz3XfxTRUwYb0qnCwONLZTb/eo/AXQqdXY+w+aSHrx5UTo0AIwwB7wuVf+Gs 1nofeR/b7OHMzhPIfZ6NoBt1EyBnMOTJimXzw1YUEG450TOS7m2tkghyU6dg+qQE vknsv5pvZhWLB0gcHthFoqZWKoBq2UdOYhHSfNe3NGptc+UwIvEJZD76vMjY7hXZ I6RdN/tyJcUejyHVY7aQLT4aXaCKQVVZVCa8FC13YvMrjnsLOggS0FxHmZrw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1782863122; x=1782949522; bh=MVyUb/CgMkjbXoQP8bvcBHwFL1+PHmt7C33 pwvqmEzM=; b=ihZdskDesS8oo3pJTjkdnG40pVOdUXXk0f5Qy3pAtIxbFuCGo+3 4+u3F9/a9F6G529n4u4zlLKy8WxsVywtYY8NbJTaovezlitTqvJbKzNcSoNRhw+5 0xZCzZTDeQ+uWFiEtfELNZHPyceS1R4enEb9Hsfrq6inS7MhqfnuK0XSpONgCXde jYlufP7rii3GCQE4i2zYm1G7tWDQNOrf24RDASViaFxLKKBNPOXrkfxZAXN9Kbil 7KAyEBfRMtQq/Lb+VLJ+xwBChhhxQaH+WIZRIFMt+uSnrTPKg3Id1+G0sOONPFFF sv2Z3LVySsVUaRbhmqFziuuQlYc3avRRLJQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFfCaJlCvMEKxHtbnyNv70IaXydVbpS5W8DNTbZ/jWJSL9z4JCdeDwjfrfSQJGjWj aeBYEFqIv0oT4ePUDahu5+KPrl0CaNVphcqi2APBEVKgaSceCVAckqImhfvhD44IdKHwVD ok+S1hqC8lmhpz6w7PL+rQFFbYUmXFPkx3lOURgSJn8VSqJikczf7QExsf+O2CmoidHcvx g74AdQFKZVSNY2xhaSD6WN+qmwLUPqHSNxAVeF0poIKDBEs5gEx511RiACTssSlayBSLxY GywqcxhYyFQLf6G/QKV+NC5AINlt7l4tUP+HCnoOSjKUcpVWQgT2zqK63UKsgGdkpiIJOk iyBQJwk/gKlLlKqyTkejasTCsESQ25GJascatXJUG4qwPY5xzo5CObc7ssChyV7iE7b06g M/PsgDjR2niVuGPG1+4vJPt9eh1IxZ7lo+jlnEQOwvnpPq8lF0MI9nMnxbEaRZwGMKE54A btmmaQq5+ILI9KZEwjEv/VYi04yofTrlptjHO3bHOzvEpdaRGjqeIZAEXhwq8hdW4ibils R3GMj+pHqfSVHutIQzFHyi2pSTBlzePU0Jq1AAQfQ9bWawBz/45WdmfrbuFWBPPAslJatH JaU4JVoq9hLCmOLUd5Uj4tJBTmvsQhH/RVfwuY4EP2DzADiEWwFA3Pf+evQw X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Jun 2026 19:45:20 -0400 (EDT) Date: Wed, 1 Jul 2026 08:45:17 +0900 From: Michael Paquier To: wenhui qiu Cc: pgsql-hackers , Japin Li , John Naylor , Christoph Berg Subject: Re: WAL compression setting after PostgreSQL LZ4 default change Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="M0oSdtd3OzyQQxPR" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --M0oSdtd3OzyQQxPR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 30, 2026 at 06:25:09PM +0800, wenhui qiu wrote: > The recent PostgreSQL commit changes the default TOAST compression to lz4 > when LZ4 support is available, based on the rationale that LZ4 is general= ly > more efficient than pglz in terms of CPU usage and compression > ratio. Given that, should we also consider changing the default > compression method used by wal_compression =3D on from pglz to lz4? "on" is just a backward-compatible value, so we could let it as-is. > Currently, wal_compression =3D on still maps to pglz, while lz4 has to be > selected explicitly with: >=20 > wal_compression =3D lz4 > If LZ4 is now considered stable and preferable enough to become the defau= lt > for TOAST compression, it may be worth aligning WAL compression behavior = as > well, or at least discussing whether on should continue to imply pglz. If I were switch the default, for me zstd goes first, lz4 is a close second, and pglz is the last of its class. The only reason why we have not chosen zstd for TOAST is the fact that we don't support it (trickier to add support for it as we have to preserve on-disk=20 compatibility for inline compressed TOAST entries). In short, lz4 is available in many environments, but I'm also ready to bet that zstd is equally available in these environments. -- Michael --M0oSdtd3OzyQQxPR Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmpEVQ0ACgkQnvQgOdby QH1YRQ//ZAuvNftSD75PplBDvlRl8MKJ+Av+RanBp1aYkHGw3RhV+QnwOPc4TpPa +112owCWGAIcPiRPvGmsRpe3rVxbdpTSjJcKwF+AX8puIyZD+2VmHpQjteYvn3jD yOy8KlAJiy3DAfe1X/6r02pHjrm52qY6WCtguk4DWuMy9iJNGvjtCZTmH9MAzb0X i159dn8ci3DviX7rf4KB/if/S9bFnTMebF7RUnm1taB76UznlYf4ztNliYMtTB6j K8gJTqAEykY9Hp0gHvQWv1MBK679A++gc/aHyS8lcgwnSzrWCpiDor1E5Ri1tdqJ Zt+WMvOrWqqYqvLtPVDkmZJVLeXJyk0ufJM8vDcE93Q2Jft0htpI2PSmqWH43azx iJ6d0As3Z7G0UceA5d8W0HgHHJv8aJPmTIaOjSYxiCaa0qi0WDz+8v4a/V64ACNr 00Jotv7XkLtGa9MXNe7vt5yym6L9x4Egf3hlSLVv/2lbXOdmVS6oan2wO4KC6D9M 99p9S3DmNBkRiqYReKQkHdlsV54EoZ8NCFR3D3nrBBed6F2FJkV2SjWO9ack/VDZ Mw9jt9u4BGQ0Z78qIZnq9NR37Ps1CKwrvHvpPxjR45U6KlAFu73uBJ1EmK3ZsFGt KUYvXLdeL9U8xLqodR5SCJ8yNcyOhVjSM1l8F3tOvamncut5EiA= =9FZs -----END PGP SIGNATURE----- --M0oSdtd3OzyQQxPR--