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 1lO7Eo-0003Tb-Bv for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Mar 2021 23:12:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lO7En-0002wE-7x for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Mar 2021 23:12:01 +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 1lO7En-0002w6-0m for pgsql-hackers@lists.postgresql.org; Sun, 21 Mar 2021 23:12:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lO7Ek-0006g7-DJ for pgsql-hackers@lists.postgresql.org; Sun, 21 Mar 2021 23:12:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12LNBoVQ504397; Sun, 21 Mar 2021 19:11:51 -0400 From: Tom Lane To: Justin Pryzby cc: Dilip Kumar , Robert Haas , Andres Freund , Tomas Vondra , Alexander Korotkov , David Steele , Ildus Kurbangaliev , Dmitry Dolgov <9erthalion6@gmail.com>, Andrey Borodin , PostgreSQL Hackers Subject: Re: [HACKERS] Custom compression methods (mac+lz4.h) In-reply-to: <456616.1616360715@sss.pgh.pa.us> References: <20210319174425.GM11765@telsasoft.com> <20210320212302.GW11765@telsasoft.com> <301730.1616276227@sss.pgh.pa.us> <20210320231957.GX11765@telsasoft.com> <309337.1616287493@sss.pgh.pa.us> <311370.1616290403@sss.pgh.pa.us> <414943.1616358751@sss.pgh.pa.us> <20210321204148.GB4203@telsasoft.com> <456616.1616360715@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 21 Mar 2021 17:05:15 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <504395.1616368310.1@sss.pgh.pa.us> Date: Sun, 21 Mar 2021 19:11:50 -0400 Message-ID: <504396.1616368310@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Justin Pryzby writes: >> On Sun, Mar 21, 2021 at 04:32:31PM -0400, Tom Lane wrote: >>> This seems somewhat repeatable (three identical failures in three >>> attempts). Not sure why I did not see it yesterday; but anyway, >>> there is something wrong with partial detoasting for LZ4. >> With what version of LZ4 ? > RHEL8's, which is > lz4-1.8.3-2.el8.x86_64 I hate to be the bearer of bad news, but this suggests that LZ4_decompress_safe_partial is seriously broken in 1.9.2 as well: https://github.com/lz4/lz4/issues/783 Maybe we cannot rely on that function for a few more years yet. Also, I don't really understand why this code: /* slice decompression not supported prior to 1.8.3 */ if (LZ4_versionNumber() < 10803) return lz4_decompress_datum(value); It seems likely to me that we'd get a flat out build failure from library versions lacking LZ4_decompress_safe_partial, and thus that this run-time test is dead code and we should better be using a configure probe if we intend to allow old liblz4 versions. Though that might be moot. regards, tom lane