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 1p2Ljr-0006K6-Ig for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Dec 2022 00:23:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p2Ljq-0000mc-El for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Dec 2022 00:23:10 +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 1p2Ljq-0000mH-5Z for pgsql-hackers@lists.postgresql.org; Tue, 06 Dec 2022 00:23:10 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2Ljn-0007bE-Lg for pgsql-hackers@lists.postgresql.org; Tue, 06 Dec 2022 00:23:09 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 275255C024A; Mon, 5 Dec 2022 19:23:07 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 05 Dec 2022 19:23:07 -0500 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=1670286187; x=1670372587; bh=o5DX7lvCar F3bGDWbStY/TprGPLMo4AqGJgUfiCsd2U=; b=fM9N0h1FjyKOfxRBKgz5IHCGbh O82uQFVXzxQWza7gFuo92hnRmuIS7Hverso7M3wF+7zyZf5nj/fkbD3F9bMeeFSU 3UWlWgoFQIb1YbBohGneZLH9jP1SaDcG952l8tNLnG5x7fSTmf+6F8cSKJkxkhqM n0uMIk3zxCPwmn4ufi0wgjMOWk7myhyxINzzJdZLQ64UvDQrwcp5HB4fdOcfmVvD N9hBmZGy0n1xwDXtBlqJo82mvQ6FeV526gqYe7Dm/l9wAf5G74yKmyhswsYWhtz3 QBf27Lf9R5tw92YX5euISGTdYdIv4lDnTx8OPSQ8JMOAnhzZVXpTwqNs237g== 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= fm1; t=1670286187; x=1670372587; bh=o5DX7lvCarF3bGDWbStY/TprGPLM o4AqGJgUfiCsd2U=; b=XvWdtshpsejFHn2qvndY8bzZvzctKKBaTucK3zcG2fVL FpNkV6/7u+NhrRBvyLbV2jDxNoEDjcWHs6DUjbhF7+GuasSh+xaJTyyDOqxNu/nZ cK4B4/xMvBF78W9QBXB/U8oVrdRVykOhWPbLPP5e/qH9HPHDB95mjkpHH+5JfG0a iDyE3WeG1fUO6rsomO1DRQHCjqRWuak79xcM47z3vQ5Q4m2mcYOXwL+FX62ihl5y CNpLhOw8ia5tPn1D2+Q9tCDZrw1ISsmMdGy4EHfjLqVIhV2+UCXXAI9MO1zccqhB kfGvn7HftKwnJTy5OIy4r0OvxMRWo0q2L0uWMeFonQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudehgddvudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Dec 2022 19:23:05 -0500 (EST) Date: Tue, 6 Dec 2022 09:22:57 +0900 From: Michael Paquier To: gkokolatos@pm.me Cc: Justin Pryzby , pgsql-hackers@lists.postgresql.org, Rachel Heaton Subject: Re: Add LZ4 compression in pg_dump Message-ID: References: <1j_ONBQqU3lQW7OqwbAFKbgcqjQosikcp7VPINqegLrHMCMGtFcXAuyjmW__VeviKyCbKTtucxFyPFUJ7sfqeOf4O90JEuUIe99Z5v7sdOg=@pm.me> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6PqK6/6g6hhte7X/" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --6PqK6/6g6hhte7X/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 05, 2022 at 12:48:28PM +0000, gkokolatos@pm.me wrote: > I also took the liberty of applying the test pattern when it the dump > is explicitly compressed. Sticking with glob_patterns is fine by me. > I was thinking a bit more about this. I think that we can use the list > TOC option of pg_restore. This option will first print out the header > info which contains the compression. Perl utils already support to=20 > parse the generated output of a command. Please find an attempt to do > so in the attached. The benefits of having some testing for this case > become a bit more obvious in 0004 of the patchset, when lz4 is > introduced. This is where the fun is. What you are doing here is more complete, and we would make sure that the custom and data directory would always see their contents compressed by default. And it would have caught the bug you mentioned upthread for the custom format. I have kept things as you proposed at the end, added a few comments, documented the new command_like and an extra command_like for defaults_dir_format. Glad to see this addressed, thanks! -- Michael --6PqK6/6g6hhte7X/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmOOi2EACgkQnvQgOdby QH1GHA//fhG9EwCOTcHSm2u7WtDVtU1cUqI901P/cao5kBxmz7iTf45c4fhcQIBk wny9LeVbjjaYg6C0AFOdjadJjUNin8raWG0PwQSggPICdq0AKT/8SwXdI/sMdjOO 9SB+4c/1F6MBxs2PD9i0GI1XiPh7oS2MkSboKvC9QOZZgR+1kmSNqN2ouEFA0wQL dr8q0H8eZaHSAKimbJ+JTL5BE71X9xvrTeJJReeP3fsXp7Ov2RvtTNsNUL11yRNt vigDVublgT2BIY+f9L6AaIjDCF/jR6BBHBuH3nv3G5vCLPUGqTudEkTVdd7DshvU y/OnbSD53ZdmfAXVF8B8dNI+oyZisjjb+7dYasvknrYdqkRvHw4cpsN/6OeKAxwq PinEVh5anYGVlcuFLw8+Wtd7FzkWYq69pfQO2z5bvgdNIUO2G+S+lMn/jHB1734/ CwytPGclNaNTsNN2lRT3WGYsFyfg90KMXAaR1xc4t7fMQXFsNeYUH725EgOsbdGK Q7a/FhMKKqeFImz47r4sS1p7tW++X8cfmpDVmew3XI9YeQFxOMPUNBqQtIMPBggS 1iCRNXZFmRt3PCULLDoNcKf8p4HHQxAk7XA1eWe3F2tfShNP7O0hfzVxtqGHUjyD r1PdM3FythuRcwgLgqxzERY1OtigEr92v38xNAAt4XaNIrwBoUI= =Ygx4 -----END PGP SIGNATURE----- --6PqK6/6g6hhte7X/--