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 1pHFeC-0003rI-Iu for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Jan 2023 02:54:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pHFeB-0006cD-Cd for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Jan 2023 02:54:55 +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 1pHFeA-0006c4-BX for pgsql-hackers@lists.postgresql.org; Mon, 16 Jan 2023 02:54:55 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHFe7-0002NW-IA for pgsql-hackers@lists.postgresql.org; Mon, 16 Jan 2023 02:54:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id EB86C5C0087; Sun, 15 Jan 2023 21:54:50 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 15 Jan 2023 21:54:50 -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=1673837690; x=1673924090; bh=NGXq/2A1yK ysVTgB6IKnYd3ZPRPv0cLcbrmtHc1vVEg=; b=QzkqiOsn3uGhRojq3AyP9Mej28 m1DOHefhA/Uz7z3abypzbOeYs4tP6TjkUludib+jv4yAHgu1PR8yDsjdbfdnWt3o qs8NjktTQeZLmE4iipDX+hTQs5TZGN2ArOtzJJfIY/loy1HKrSC32UuAnRt2kvO2 /GqH/HCmiNuF7mKw3ZPySvTNgWj/yFjNEoU2nG1mRLTt0naIZglVkMUv+Bsq76aT XNUcsHOpBnXWjSm2zzwsWHez31e2j2gI3wTuPB14G4Fv5Aen10R8tuWjrq6c1uNr pcuAFqKyG/T/ZwDwGZniOHz97XhdJktpJ4fMda4mffasTxgz85lffed7DvIg== 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=1673837690; x=1673924090; bh=NGXq/2A1yKysVTgB6IKnYd3ZPRPv 0cLcbrmtHc1vVEg=; b=GIySx6ILSQTuLQtpDnClTXMTkfqShzhtBYaXHw+SV+kC fOCFgzmLckiWRMr5wKuJ0FrWvowXUQru7qlot9uF6NXOf5f90llpHv9mRDoCh0PL B5mOu/DKqFYJh4y9e4AEHK24f1AUgu+ROg9q/UOviXmbNZmfkfMY95aCMf4vXIpm peVIYM6dCdUzg+bXhIb/9RRGbRWcjSOEiruGp5fGLKD6U8P+5SsBbmeMi0a+c862 LQmmo9oMXuISxKIsRkBkSgVNaiHbemYpJSY71P5t1ihAQN2osKPyUrderkWdy41Y HRiKI1pExmCCDdwjwKZ+a48IbfbvOtYMLsoziZZ6qQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddtfedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 15 Jan 2023 21:54:48 -0500 (EST) Date: Mon, 16 Jan 2023 11:54:46 +0900 From: Michael Paquier To: Justin Pryzby Cc: gkokolatos@pm.me, pgsql-hackers@lists.postgresql.org, Rachel Heaton Subject: Re: Add LZ4 compression in pg_dump Message-ID: References: <20221219172706.GA1153@telsasoft.com> <20221220152610.GG1153@telsasoft.com> <20221222170859.GO1153@telsasoft.com> <20230108194524.GA27637@telsasoft.com> <20230114214308.GC9837@telsasoft.com> <20230116015625.GH9837@telsasoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bOFKrhzd3N17EszA" Content-Disposition: inline In-Reply-To: <20230116015625.GH9837@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --bOFKrhzd3N17EszA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 15, 2023 at 07:56:25PM -0600, Justin Pryzby wrote: > On Mon, Jan 16, 2023 at 10:28:50AM +0900, Michael Paquier wrote: >> The functions changed by 0001 are cfopen[_write](), >> AllocateCompressor() and ReadDataFromArchive(). Why is it a good idea >> to change these interfaces which basically exist to handle inputs? >=20 > I changed to pass pg_compress_specification as a pointer, since that's > the usual convention for structs, as followed by the existing uses of > pg_compress_specification. Okay, but what do we gain here? It seems to me that this introduces the risk that a careless change in one of the internal routines if they change slight;ly compress_spec, hence impacting any of their callers? Or is that fixing an actual bug (except if I am missing your point, that does not seem to be the case)? =20 >> Is there some benefit in changing compression_spec within the >> internals of these routines before going back one layer down to their >> callers? Changing the compression_spec on-the-fly in these internal >> paths could be risky, actually, no? >=20 > I think what you're saying is that if the spec is passed as a pointer, > then the called functions shouldn't set spec->algorithm=3Dsomething. Yes. HEAD makes sure of that, 0001 would not prevent that. So I am a bit confused in seeing how this is a benefit. -- Michael --bOFKrhzd3N17EszA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmPEvHYACgkQnvQgOdby QH0dXQ/8DP9FUhAk4QO0TljyR7vX/D9eY4JAaKJu/o84cQ/VA1M4533eWMsI+dmy qEjVoFYPN6juTbefgLlh3AuTS5qYq6Edsx4YopE2kCWQvQJpNaABvL0Oel5kxHTN YenJTViaq6beU/2FiNJ6QibelTEtQhudXolnU22rzcTZ0xjVOIi1igltjD1MXWYQ OOb+XlFpFWcpWe9An+TCVQl7WfO6zDZJy21hliRswEv8pseaSyqnGb2OXkFqb1Ps /grn8NLyUTmk89/tpF9wZ1aB2hm9f9Up0h1hRKsap+Rabu/odtL1tMPDRFTCa9i4 VfNN6X4zCSeEFGf/BsVTfFqHGx1OonrNSSEQZLgPY7S+PG2BRT2YzBJtQ8P6DfPm wJ6CK0Pq7LUbWg/cjtHWWFYF68LjUBZ6h4AggMbKbhS2cMsNtPX8fkOBie17W9KM 7ufu613FK4jpfM0K14if0CQxVUhrQjjIR4sL0NZJWA4rOCvgm3KuZR+UzvqbLhfi DfcnziT+HNyG56C5miW5KDD8vFh1N68eATKZg+f8JB9zL22sJP4CGju80OTpM2+w 2UpC1hYF4ZaSPjbstce6Br9p9uXZ39UDyx0/2K+J5LEF2qZobaB9vhjm9nwvFrfX ZHADWfEF+Mn20LRK+T54QtiF07RdLmTpMEqo2YHA1aO+X3RK7uE= =hE80 -----END PGP SIGNATURE----- --bOFKrhzd3N17EszA--