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 1pIswn-0006wh-8f for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jan 2023 15:04:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pIsvn-0006V4-JQ for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jan 2023 15:03:51 +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 1pIsvn-0006UZ-8h for pgsql-hackers@lists.postgresql.org; Fri, 20 Jan 2023 15:03:51 +0000 Received: from mail-4322.protonmail.ch ([185.70.43.22]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pIsvk-0003Lb-24 for pgsql-hackers@lists.postgresql.org; Fri, 20 Jan 2023 15:03:50 +0000 Date: Fri, 20 Jan 2023 15:03:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1674227025; x=1674486225; bh=/xF6qcQHQoC0ZdLEu1EGDhH2whbwEw9Pt/j6272cEfM=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=fw5+h6O0vTbFYrPc1+yD0nbEHxQRYieoiVZlx2JvOFPUlCOGDqPyMFXYZJxS71iyM WGTV4Uo9zS1GCqVkWiwZPUsjhQAYTqTW1+wORRdBZl9uOVkt/7tWQjojFBht2sn41v yghm8gaVfUNuB6KUaQazgryrVVTu4b07eGx9kPJnpfVTtxlTi6jPB74brStRvy/Y/3 qOT7Fd+zb6rzqkXNaiY7pGuMKyqVkobYSvBytqpD4P/Lo/E7y30ajTCIfpDcLlVfm/ 00Wfw1f2o49zi24b/vBujb8qHmjHPXsYEr/1buRjq6orh9B4fHvG+ItiizWs9LVRy5 zIPAtualf/v/g== To: Tomas Vondra From: gkokolatos@pm.me Cc: Michael Paquier , Justin Pryzby , pgsql-hackers@lists.postgresql.org, Rachel Heaton Subject: Re: Add LZ4 compression in pg_dump Message-ID: In-Reply-To: References: <41036470-041b-08a3-469d-fe07de2bc58e@enterprisedb.com> <6ab89d42-0345-b96e-02d4-68e171cdbe03@enterprisedb.com> <7zu6GYFi72jByVk2SEe_nd8r1DHhwA35vSntAE9sAfiMX9Lfk6bwimkwmu7GDgYaEvL27SE4qF1uK4_LHWQM4H-SXOwkMAI-GV8PKGmED_E=@pm.me> Feedback-ID: 6383013:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- Original Message ------- On Friday, January 20th, 2023 at 12:34 AM, Tomas Vondra wrote: >=20 >=20 > On 1/19/23 18:55, Tomas Vondra wrote: >=20 > > Hi, > >=20 > > On 1/19/23 17:42, gkokolatos@pm.me wrote: > >=20 > > > ... > > >=20 > > > Agreed. It was initially submitted as one patch. Then it was requeste= d to be > > > split up in two parts, one to expand the use of the existing API and = one to > > > replace with the new interface. Unfortunately the expansion of usage = of the > > > existing API requires some tweaking, but that is not a very good reas= on for > > > the current patch set. I should have done a better job there. > > >=20 > > > Please find v22 attach which combines back 0001 and 0002. It is missi= ng the > > > documentation that was discussed above as I wanted to give a quick fe= edback. > > > Let me know if you think that the combined version is the one to move= forward > > > with. > >=20 > > Thanks, I'll take a look. >=20 >=20 > After taking a look and thinking about it a bit more, I think we should > keep the two parts separate. I think Michael (or whoever proposed) the > split was right, it makes the patches easier to grok. >=20 Excellent. I will attempt a better split this time round. >=20 > While reading the thread, I also noticed this: >=20 > > By the way, I think that this 0002 should drop all the default clauses > > in the switches for the compression method so as we'd catch any > > missing code paths with compiler warnings if a new compression method > > is added in the future. >=20 >=20 > Now I realize why there were "not yet implemented" errors for lz4/zstd > in all the switches, and why after removing them you had to add a > default branch. >=20 > We DON'T want a default branch, because the idea is that after adding a > new compression algorithm, we get warnings about switches not handling > it correctly. >=20 > So I guess we should walk back this change too :-( It's probably easier > to go back to v20 from January 16, and redo the couple remaining things > I commented on. >=20 Sure. >=20 > FWIW I think this is a hint that adding LZ4/ZSTD options, in 5e73a6048, > but without implementation, was not a great idea. It mostly defeats the > idea of getting the compiler warnings - all the places already handle > PG_COMPRESSION_LZ4/PG_COMPRESSION_ZSTD by throwing a pg_fatal. So you'd > have to grep for the options, inspect all the places or something like > that anyway. The warnings would only work for entirely new methods. >=20 > However, I now also realize the compressor API in 0002 replaces all of > this with calls to a generic API callback, so trying to improve this was > pretty silly from me. I can try to do a better job at splitting things up. >=20 > Please, fix the couple remaining details in v20, add the docs for the > callbacks, and I'll try to polish it and get it committed. Excellent. Allow me an attempt to polish and expect a new version soon. Cheers, //Georgios >=20 >=20 > regards >=20 > -- > Tomas Vondra > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company