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 1pL0p5-0000mY-21 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Jan 2023 11:53: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 1pL0p3-0007Y7-Vb for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Jan 2023 11:53:41 +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 1pL0p3-0007Xj-Ml for pgsql-hackers@lists.postgresql.org; Thu, 26 Jan 2023 11:53:41 +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 1pL0p1-0005W1-6U for pgsql-hackers@lists.postgresql.org; Thu, 26 Jan 2023 11:53:40 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 55A775C0118; Thu, 26 Jan 2023 06:53:38 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 26 Jan 2023 06:53:38 -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=fm3; t=1674734018; x=1674820418; bh=BM+wfCDV5p v4BfbqddYqQfJozgwL/s8Ohq8tjB++PV0=; b=TcLv37+LWjEUNgI7XGJJ5s+otT g8Yt/AdE9k/PpKJOledM654cP+g3GmLcXFvRmLVTdFe6ICY/l25YcwZzMbSBvLUu 1pjAAgP6jAOeH5fbPKFaDPLDYtQyjl0q9TVVwgg/VgkoDaTwphG0TXNfYUmNpC6z W6eOX0sYZjesltbnEOBsJPA52GOL1rVJBC+1ifgaP2frMBuh9WM/7WwRu68vI0dq A35DU46UKH6FkqRsSec6q0lIP1CLtRWD6eEJZWr1cldV07tOaLhB2S0ivdXZQ32I 0Tw7zfKo8xT1YyBTrczzeKt4KYR1umhOB4ewkT6qKWaLpDfPUREbYoNfUHjw== 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= fm3; t=1674734018; x=1674820418; bh=BM+wfCDV5pv4BfbqddYqQfJozgwL /s8Ohq8tjB++PV0=; b=dFGCWTovWejDGQJBs5lrfAplAthtofz33dqfxOkYULHE AGFzEw4ONSCLp/lU7F5HqpzNiWgiWIMnhjui16vBekWDsX47pjN0Fk+4cDV2HPuE TWXmXlxfHRc+GreMt1mxzgpqu0Ob8x++8Cq5A8t0koUVMQWMPxX6SoCQeezrEo4q FYopQ75Lj8vPLDL1dVcweQnrYoiCYgJTcPI+m/rkBtkpiyCR0lXGO4pj9OEn4n5n dXLFcaxvAz+bJSsplRadG+AHUCBNeT9TCleCwLNFRoMlbgFwoSwKUc2YIKS2aZSe EICN+iaGHEvfi2ZYez/5AUd7GRxCoellkPZE3HswGw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvgedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Jan 2023 06:53:36 -0500 (EST) Date: Thu, 26 Jan 2023 20:53:28 +0900 From: Michael Paquier To: gkokolatos@pm.me Cc: Justin Pryzby , Tomas Vondra , pgsql-hackers@lists.postgresql.org, Rachel Heaton Subject: Re: Add LZ4 compression in pg_dump Message-ID: References: <7zu6GYFi72jByVk2SEe_nd8r1DHhwA35vSntAE9sAfiMX9Lfk6bwimkwmu7GDgYaEvL27SE4qF1uK4_LHWQM4H-SXOwkMAI-GV8PKGmED_E=@pm.me> <20230123180014.GX13860@telsasoft.com> <20230125014203.GL13860@telsasoft.com> <-myGeDiZ-ePDRyi18026Iu2HTTfmwfjWaJn4OWJ2F3oglZUfJTOQ7FARPW7gYxE4vK3b0HpwYoiHR45nfOWReRvvJZfCBfJzPP5iJyn4muk=@pm.me> <20230125180020.GF22427@telsasoft.com> <20230126062846.GO22427@telsasoft.com> <6YZqN2HEE4yJxxxXWiMl4QWwKzLon0SdKETTGVkT9zjWnXMftGZjLKHHjGFuwC_5I6xL2s8nMXdLQGA4vEFveYXSHbfD9K9pDQvEJF2y99o=@pm.me> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X3+jOHMHubTMLmRx" Content-Disposition: inline In-Reply-To: <6YZqN2HEE4yJxxxXWiMl4QWwKzLon0SdKETTGVkT9zjWnXMftGZjLKHHjGFuwC_5I6xL2s8nMXdLQGA4vEFveYXSHbfD9K9pDQvEJF2y99o=@pm.me> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --X3+jOHMHubTMLmRx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 26, 2023 at 11:24:47AM +0000, gkokolatos@pm.me wrote: > I gave this a little bit of thought. I think that ReadHead should not > emit a warning, or at least not this warning as it is slightly misleading. > It implies that it will automatically turn off data restoration, which is > false. Further ahead, the code will fail with a conflicting error message > stating that the compression is not available. >=20 > Instead, it would be cleaner both for the user and the maintainer to > move the check in RestoreArchive and make it the sole responsible for > this logic. - pg_fatal("cannot restore from compressed archive (compression not supp= orted in this installation)"); + pg_fatal("cannot restore data from compressed archive (compression not= supported in this installation)"); Hmm. I don't mind changing this part as you suggest. -#ifndef HAVE_LIBZ - if (AH->compression_spec.algorithm =3D=3D PG_COMPRESSION_GZIP) - pg_fatal("archive is compressed, but this installation does= not support compression"); -#endif However I think that we'd better keep the warning, as it can offer a hint when using pg_restore -l not built with compression support if looking at a dump that has been compressed. -- Michael --X3+jOHMHubTMLmRx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmPSabgACgkQnvQgOdby QH2y2g//bQ8Qnd47G28Obe7muFz3PzWPkVlI6Jl8zIUCgqn61xmGsVJzA8eYccgw A62jYxcNRyh1ufNqxFGi6WK0cxYLk1GVSSmXeEM4e835kDrTS8dyPB3NToSXdfMp FSrWvYnTKvRtdpJoSe9hqHYRmiPtF0TeYKLgLuK+5+fAEXmpTXlKUyM9TErxh7q/ DOZsjycFQk3/SHsLNvFXNDexiFwutKERzsToIie84COLJWzAv8DcZZKmhMVfjfhh 3j/J4LKL5h/t+XqwlxJq2TDg1AFtwmp2BRpXK0Ajps6+D1qSdg3649zN4GNUzIH2 YQH+eFVgqpn938nUcBeqdh81qVapRI07b0CO/C7BI//JlcfEuhcAdGhBGuwxjyeO BbBcDekxrxXwSl9IM+0MhPPNHf1j4qWXCVw4GquzL6Fo0XgHSQgARB6jevO7Mpfi Lj3xvEeLdHQCdFiPUDjjnbZC3TyX9JQQO4c6uMru1vQiXfypP/govYNOelITdOkw blXxPZq2wE+jmoWGlg81OC5omRXtoSsywM6XV/6kSYcL5+YQl7m9dk/Tartj04zy 8goHju+DSFhgjdcrbyeNWq9tUW/DC5R/ETu24TZY3xqbb9ba3stgek1/p8HOORa8 5l0B75hRYlfNsNaLuKOAolZhsZi1gbADtjjm9fr8f5I0fr3DbrI= =K02T -----END PGP SIGNATURE----- --X3+jOHMHubTMLmRx--