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 1nVEC9-0003bj-Ms for pgsql-committers@arkaria.postgresql.org; Fri, 18 Mar 2022 15:07:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nVEC8-0000rN-ER for pgsql-committers@arkaria.postgresql.org; Fri, 18 Mar 2022 15:07:12 +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 1nVEC8-0000rE-7x for pgsql-committers@lists.postgresql.org; Fri, 18 Mar 2022 15:07:12 +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 1nVEC5-00046T-SG for pgsql-committers@lists.postgresql.org; Fri, 18 Mar 2022 15:07:11 +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 22IF749x1069624; Fri, 18 Mar 2022 11:07:04 -0400 From: Tom Lane To: Julien Rouhaud cc: Michael Paquier , Peter Eisentraut , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Add option to use ICU as global locale provider In-reply-to: <20220318031244.tu3wwlyxxabzq3iu@jrouhaud> References: <20220318031244.tu3wwlyxxabzq3iu@jrouhaud> Comments: In-reply-to Julien Rouhaud message dated "Fri, 18 Mar 2022 11:12:44 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1069622.1647616023.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 18 Mar 2022 11:07:04 -0400 Message-ID: <1069623.1647616024@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Julien Rouhaud writes: > That being said, we could save the result and explicitly close the colla= tor. > That wouldn't make much difference in initdb (but may be a bit cleaner),= but I > see that there's a similar coding in createdb(), which seems like it cou= ld leak > some memory according to ucol_close man page. FYI, I verified using valgrind that (as of HEAD) there is a leak when creating a database with ICU collation that doesn't appear when creating one with libc collation. It's not a lot, a few hundred bytes per iteration, but it's there. regards, tom lane