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 1n8DBn-00047C-4I for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Jan 2022 03:23:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n8DBl-0004jI-Ez for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Jan 2022 03:23:41 +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 1n8DBj-0004j9-EA for pgsql-hackers@lists.postgresql.org; Fri, 14 Jan 2022 03:23:41 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n8DBf-00023s-2Y for pgsql-hackers@lists.postgresql.org; Fri, 14 Jan 2022 03:23:39 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 923EA5C014B; Thu, 13 Jan 2022 22:23:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 13 Jan 2022 22:23:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=WoMHmk9HW4otUZTpAEng7l8I9Wa hPjEfiSOf05glkVs=; b=rH9GxFTaqs+vuo17tZ4EL+J3ZrX/ok0Acni2hy5L96O klT/wXiSZj8D91fueb3nLCgV/4brDE+1hJm92J/F/mWhbi00r/dGbGE6KO/TEMig mK6JiGSCrnaHctW9Zq1aire5yf5ixz15azkEBnWbNZ53ZpODTXBYXxDY7rbFiker /jfSA0rW/sIZZLAxGcdhIxuFvBiZuEJaGB1I+GqK2jWAnNKcY2PpzOUBbyPQ66Dm Mnqh6rlw/wosExcgX5x+QFCbp+Q5pPKQ2GkiQDaxjeysdpk02TsgDUPozkZ94duB C0zIEQG9pTDFTv4ikRhk5jl5Lk+Uazi8wHckuGslxwA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=WoMHmk 9HW4otUZTpAEng7l8I9WahPjEfiSOf05glkVs=; b=fMFQllY4hnGwhu/Sq6/6+q HafatNNT/cntw8lcYpyjZ2BOfurrfUMKs1BPz93BneSYAtlQk9DnN504Jpm/wUkr 8ucmGwFn4tjOAxLrGjgo7AzqPY7KCUfasoTLTCbOJ1M/esnDO65gc6w3j6i/wVUS FOSQiYZgtko8FFqExSI56ETqsK6/ROf/GuBmyXVk+IkEhlyol+x9HzssiaPEp1m+ IWcZeUxQDVaoq3hZ+WV+ZV4+n7l58HggsreXd0JbZuNya7NRdKJocv3kUcwvn36T k0H5cjr3wuEh+VA6tsXqeIMdQ4T0awLZS16HTeU28at9NUXom+DDZek183sSshcQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrtdeggdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveejheeh ieevueeigeelteegleejleeiueeiheegvefhnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jan 2022 22:23:30 -0500 (EST) Date: Fri, 14 Jan 2022 12:23:27 +0900 From: Michael Paquier To: Robert Haas Cc: Georgios Kokolatos , Postgres hackers , Jeevan Ladhe Subject: Re: Refactoring of compression options in pg_basebackup Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WPxTUyJ4dLUY5oHY" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --WPxTUyJ4dLUY5oHY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 13, 2022 at 01:36:00PM -0500, Robert Haas wrote: > 1. If, as you propose, we add a new flag --compression-method=3DMETHOD > then how will the user specify server-side compression? This would require a completely different option switch, which is basically the same thing as what you are suggesting with --server-compress. > 2. If, as we seem to agree, the compression method is more important > than the compression level, then why is the option to set the > less-important thing called just --compress, and the option to set the > more important thing has a longer name? I agree that the method is more important than the level for most users, and I would not mind dropping completely --compress in favor of something else, which is something I implied upthread. > I proposed to solve both of these problems by using > --compression-level=3DNUMBER to set the compression level and > --compress=3DMETHOD or --server-compress=3DMETHOD to set the algorithm and > specify on which side it is to be applied. If, instead of doing that, > we go with what you have proposed here, then I don't understand how to > fit server-side compression into the framework in a reasonably concise > way. I think we would end up with something like pg_basebackup > --compression-method=3Dlz4 --compress-on-server, which seems rather long > and awkward. Do you have a better idea? Using --compression-level=3DNUMBER and --server-compress=3DMETHOD to specify a server-side compression method with a level is fine by me, but I find the reuse of --compress to specify a compression method=20 confusing as it maps with the past option we have kept in pg_basebackup for a couple of years now. Based on your suggested set of options, we could then have a --client-compress=3DMETHOD and --compression-level=3DNUMBER to specify a client-side compression method with a level. If we do that, I guess that we should then: 1) Block the combination of --server-compress and --client-compress. 2) Remove the existing -Z/--compress and -z/--gzip. You have implied 1) upthread as far as I recall, 2) is something I am adding on top of it. > I think I understand what the patch is doing. I just think it creates > a problem for my patch. And I'd like to know whether you have an idea > how to solve that problem. And if not, then I'd like you to consider > the solution that I am proposing rather than the patch you've already > got. I am fine to drop this thread's patch with its set of options and work on top of your proposal, aka what's drafted two paragraphs above. -- Michael --WPxTUyJ4dLUY5oHY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmHg7K8ACgkQnvQgOdby QH1DoQ/9EVkSmQ/jmIF/+O/NbtVXCcuI9Oi8Vyx4wn65lPirXCV9U9devCOCJgI0 5wigkIHGtqShSA9Kc74tRzSqzwCadSCPz5lSNfVoEqMYEOt1V4t3FtG/ZHOBfyZw dXUjb00e/QIYl5eWr7D6I0TYJILtKTnB7LuynytaP0O1ucMfI7dERUI5B31d9bAj Ge0OigwzUIPPOx1ceJqiRUbkRibMwcxI1XzV+jYo7PvDlHeNbV69gSi6GVn+6jn/ U0DW6ZcCbt1RcM/fHf2W/lzJjV81QTR4x4QM/w0SpsZVW3F7JiDKajHIiVibh/WZ 5KJSs7DHBolSs9q7JhhKnErXi/pmAbcqF+Z5UXmR6zXLpHpHJv42VApcvJt4W85E O1vNswEqP0JHOKbyRVKLEVy0n/YkblP7dyWVM1k7dSLkxHwrL8M+0ywzMfNVk4wN xFLFJ15wlCnSNC11WHfTyD8BOPaS2m+41wpQarUiK9tbl8rdMkwcg7zclDJ9mAiz twfj/0dV5X5zdLX/uk/Hwco8o5rn/X7hOCc4IwSsqlO0UCJ+D5VWh+5qnIoivTTX 4fjfnYO3AOCWta55xk5ell8Z8foPYHZHXJn2qQ+FY3kU00tmm5cd6VEPrEhQp8qW mqbVYjOWE4aRpI4E9XQfKh8NZlWpBd21QCiZt2n9gUYbHmvUCX4= =iMBG -----END PGP SIGNATURE----- --WPxTUyJ4dLUY5oHY--