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 1nekNr-0003Fd-DG for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Apr 2022 21:18:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nekNq-0005tu-7x for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Apr 2022 21:18:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nekNp-0005tg-UU for pgsql-hackers@lists.postgresql.org; Wed, 13 Apr 2022 21:18:37 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nekNn-0003kx-Gw for pgsql-hackers@lists.postgresql.org; Wed, 13 Apr 2022 21:18:36 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 3B5013201061; Wed, 13 Apr 2022 17:18:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 13 Apr 2022 17:18:33 -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=fm1; t=1649884712; x=1649971112; bh=maoe3ibMYK QGcw1pLk7zop6OSiWh0aVzj5NdzwtCFy8=; b=QRk0yiwCHAk/OWptx9nS+5tIrp Vmwubm8NKSixgEzObd/vA45pFZVk5xdZE44MXMujAypEcfYXhcJByDcokIHDvzox XuGSGuaX444atzV828Y/NCWRaY+AYB0e3NEHgQ7WViuYE/zA76atNt+4wFsklhbB 6IFHXmytjiYCeLD3bGXZg+XweSQoV/03DWUVcS395UZpdii9hx0YBPkhFbx0lH46 xGDUmW/a16tt3abWmKthJJinluAFJFbVYwqAhmO3njXOWHPnHMpgQtC5gmVb4OEO k0gZBS9S007LeUB7u3x/EkisPikfmeVTR4h8O7FtNUHGJ5wbKQWKUQIERnvg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; 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:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1649884712; x= 1649971112; bh=maoe3ibMYKQGcw1pLk7zop6OSiWh0aVzj5NdzwtCFy8=; b=g 0qPimoEZmR4lJx1x14bccWTGn0z3aY3ir9t59cXISN9lMkxzAkmODmS9DUa8Cw6k eJeW1Wt3c8p3OKo/gOuIIkVkA5LC/uLyYUepPbKydeeZcsjUho2FjGl9FDioFFWd qb4yz/o3GXsEYQjgJ06ETDx1y0aPyr57XQdJWiauY8dW6a2Dee1RaKWFKiwQgOwq 22YopgEvFy5NrJfowRqrmSFap1l3VZABJlZF6fsCIS+Hu4fVkEEYWpesy7ZbqDLE ygD5kjzbRIcf9iCVBasbpm5/iR2GYfeWnOxjNNvAo8X8uMHKupZ3+YOaeVLE131+ hb5rLOyI/guC6soG5ifCA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeluddgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddvfedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepkeeutdejkeeugeeuueejieeu geefffdvjeekkeekjedvtddugeegkedugfegfeeunecuffhomhgrihhnpehpohhsthhgrh gvshhqlhdrohhrghdpphhmrdhmvgenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Apr 2022 17:18:31 -0400 (EDT) Date: Thu, 14 Apr 2022 06:18:29 +0900 From: Michael Paquier To: gkokolatos@pm.me Cc: Postgres hackers , Robert Haas Subject: Re: Fixes for compression options of pg_receivewal and refactoring of backup_compression.{c,h} Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cuNcTxqduOFXdShM" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --cuNcTxqduOFXdShM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 13, 2022 at 02:58:28PM +0000, gkokolatos@pm.me wrote: > It's really not hard to add compression level. However we had briefly > discussed it in the original thread [1] and decided against. That is why > I did not write that code. If the community thinks differently now, let > me know if you would like me to offer a patch for it. The issue back then was how to design the option set to handle all that (right? My memories may be short on that), and pg_basebackup takes care of that with its option design. This is roughly what has been done here, except that this was for the contentSize: https://www.postgresql.org/message-id/rYyZ3Fj9qayyY9-egNsV_kkLbL_BSWcOEdi3Mb6M9eQRTkcA2jrqFEHglLUEYnzWR_wttCqn7VI94MZ2p7mwNje51lHTvWYnJ1jHdOceen4=@pm.me Do you think that the extra test coverage is going to be too much of a burden? I was thinking about just adding a level to the main lz4 command, with an extra negative test in the SKIP block with a level out of range -- Michael --cuNcTxqduOFXdShM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmJXPiUACgkQnvQgOdby QH1v8w//dFW1clFE5qy/uh6IMuzJ0yRhhHRgH3q7ElZKyWxAtzpXM5ZEKskvt1OK YIY65VJtWCDk7/VdUUZ+pNnHnM329CSEThxn2eH3sIPe9idpyirN1Yq3hW3ibPp9 GpoblJ4ylfls3Xk5+g2LWbqmq3Q0ed6Kn21IDTkAzzlzTUsS5+m+qKxaBcPyxwZx sUoBe7gQFq4FAT1AsBXrkbRGFKqIcRnZP7mcJFHreqY5GjSLDPGdIwcGQKyru7FP PELj38tna9JcpAI8kVz3+FvS6vgC2s+47qst4vAYO75tlzN4QGT0XK2edJKRSRFz GeI3bevMzrfn0zqPldHK8bVsNehZxVUkxqMY8XAtv7WrdBjuiNULpdCyVyewuKt7 JYhLRYFNghjQFXbX4BwJx7PK05pWXsc+IAfynRapCqqbq6mHO8+Nwk/vQDzTMbLM 6jl0Ik5JP84y3RqhUbRR9SfkDp9OFXCXbhX3eL3jrNomzrPzidekhALGNgWytmBf 0ZTmiwpMdhIo9ShCYUEoskUJ7Fo2mKU39W0C1sSW5DpPeyjlXXelQg2yEvGMyN+g FJu8m1mcelg+WXGvKQqpDnTEmLu/n5GcWTGiLlT2+xXIIhcJ98gaoKzA/Af6T03T ONhV7gdA8zCqE5W/pA/n580+Ed+O8oYXy9J3oaWWJbIwakLNX+M= =irMy -----END PGP SIGNATURE----- --cuNcTxqduOFXdShM--