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 1lO4kg-0006u9-NC for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Mar 2021 20:32:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lO4kf-0001zn-9V for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Mar 2021 20:32:45 +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 1lO4kf-0001zg-2L for pgsql-hackers@lists.postgresql.org; Sun, 21 Mar 2021 20:32:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lO4kY-0000Lx-QR for pgsql-hackers@lists.postgresql.org; Sun, 21 Mar 2021 20:32:44 +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 12LKWVA8414944; Sun, 21 Mar 2021 16:32:31 -0400 From: Tom Lane To: Dilip Kumar cc: Justin Pryzby , 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: References: <20210319163511.GL11765@telsasoft.com> <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> Comments: In-reply-to Dilip Kumar message dated "Sun, 21 Mar 2021 10:52:14 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <414942.1616358751.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 21 Mar 2021 16:32:31 -0400 Message-ID: <414943.1616358751@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dilip Kumar writes: >> Yeah, we need to set the default_toast_compression in the beginning of >> the test as attached. > In the last patch, I did not adjust the compression_1.out so fixed > that in the attached patch. Pushed that; however, while testing that it works as expected, I saw a new and far more concerning regression diff: diff -U3 /home/postgres/pgsql/src/test/regress/expected/strings.out /home/= postgres/pgsql/src/test/regress/results/strings.out --- /home/postgres/pgsql/src/test/regress/expected/strings.out 2021-02-18 = 10:34:58.190304138 -0500 +++ /home/postgres/pgsql/src/test/regress/results/strings.out 2021-03-21 1= 6:27:22.029402834 -0400 @@ -1443,10 +1443,10 @@ -- If start plus length is > string length, the result is truncated to -- string length SELECT substr(f1, 99995, 10) from toasttest; - substr = --------- - 567890 - 567890 + substr = +------------------------ + 567890\x7F\x7F\x7F\x7F + 567890\x7F\x7F\x7F\x7F 567890 567890 (4 rows) @@ -1520,10 +1520,10 @@ -- If start plus length is > string length, the result is truncated to -- string length SELECT substr(f1, 99995, 10) from toasttest; - substr = --------- - 567890 - 567890 + substr = +------------------------ + 567890\177\177\177\177 + 567890\177\177\177\177 567890 567890 (4 rows) 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. regards, tom lane