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 1oN4Bc-0004XG-5R for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Aug 2022 03:21:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oN4Bb-0006XF-0M for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Aug 2022 03:21:11 +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 1oN4Ba-0006X5-O2 for pgsql-bugs@lists.postgresql.org; Sun, 14 Aug 2022 03:21:10 +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 1oN4BY-0007eV-JD for pgsql-bugs@lists.postgresql.org; Sun, 14 Aug 2022 03:21:09 +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 27E3L4cU555148; Sat, 13 Aug 2022 23:21:04 -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> Comments: In-reply-to Peter Geoghegan message dated "Sat, 13 Aug 2022 19:43:30 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <555146.1660447264.1@sss.pgh.pa.us> Date: Sat, 13 Aug 2022 23:21:04 -0400 Message-ID: <555147.1660447264@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Geoghegan writes: > I think that repalloc might even be mandatory. These buffers are used > as caches that allow us to avoid repeat strxfrm()/strcoll() calls, > which is quite a useful optimization. But we're not accounting for > that here -- we're not invalidating the cache. We wouldn't have to > bother with that if we just used repalloc(). Hmm, but if we're enlarging the buffer, doesn't that imply a new input value? Seems like invalidation must occur anyway. regards, tom lane