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 1oN4xr-0006jz-QN for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Aug 2022 04:11: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 1oN4xp-00017t-N6 for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Aug 2022 04:11: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 1oN4xp-00017k-Ew for pgsql-bugs@lists.postgresql.org; Sun, 14 Aug 2022 04:11: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 1oN4xn-0007zz-At for pgsql-bugs@lists.postgresql.org; Sun, 14 Aug 2022 04:11: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 27E4AtA5559704; Sun, 14 Aug 2022 00:10:55 -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> Comments: In-reply-to Peter Geoghegan message dated "Sat, 13 Aug 2022 20:55:46 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <559702.1660450255.1@sss.pgh.pa.us> Date: Sun, 14 Aug 2022 00:10:55 -0400 Message-ID: <559703.1660450255@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Geoghegan writes: > On Sat, Aug 13, 2022 at 8:21 PM Tom Lane wrote: >> Hmm, but if we're enlarging the buffer, doesn't that imply >> a new input value? Seems like invalidation must occur anyway. > Yeah, on second thought it should be invalidated anyway (I had to > check because the details of how we cache strxfrm() and strcoll() are > tricky). Even still, I think that we should just use repalloc for > this. Works for me. I'll see about pushing the fix tomorrow. Thanks for the additional investigation! regards, tom lane