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 1oNGhb-0001q7-3A for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Aug 2022 16:43:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oNGhZ-0002LS-CR for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Aug 2022 16:43:01 +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 1oNGhZ-0002LJ-3w for pgsql-bugs@lists.postgresql.org; Sun, 14 Aug 2022 16:43:01 +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 1oNGhS-0005IO-E2 for pgsql-bugs@lists.postgresql.org; Sun, 14 Aug 2022 16:42:59 +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 27EGgopr775232; Sun, 14 Aug 2022 12:42:50 -0400 From: Tom Lane To: Peter Geoghegan cc: James Inform , PostgreSQL mailing lists , Euler Taveira Subject: Re: BUG #17584: SQL crashes PostgreSQL when using ICU collation In-reply-to: References: <17584-95c79b4a7d771f44@postgresql.org> <465044.1660428315@sss.pgh.pa.us> <92087cd5-5410-a4e9-41fe-4ff310439190@pharmapp.de> <541938.1660437017@sss.pgh.pa.us> <555147.1660447264@sss.pgh.pa.us> <559703.1660450255@sss.pgh.pa.us> <587801.1660457745@sss.pgh.pa.us> <651207.1660487132@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Sun, 14 Aug 2022 09:17:12 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <775230.1660495370.1@sss.pgh.pa.us> Date: Sun, 14 Aug 2022 12:42:50 -0400 Message-ID: <775231.1660495370@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Geoghegan writes: > I also suspect that the test case happens to tickle some obscure UCA > implementation detail in just the right/wrong way, where (for whatever > reason) it is necessary for the implementation to use a fairly large > buffer, despite the fact that it knows that its varlena.c caller will > only require enough conditioned binary key bytes to build an 8 byte > abbreviated key. It might be very rare and hard to hit (and/or depend > on the ICU version), which would explain why it took this long to hear > any complaints. So...I think that it might be quite difficult to test > this. I think that on our side, it also requires using incremental sort, creating yet another obstacle to building a small test case. > BTW, is the plan to get rid of the questionable coding pattern in both > varstr_abbrev_convert() and in varstrfastcmp_locale()? I am in favor > of just using repalloc() across the board. Yeah, done that way already. regards, tom lane