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 1pDBam-0004IE-LE for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Jan 2023 21:46:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pDBal-0006A4-An for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Jan 2023 21:46:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pDBal-00069u-0a for pgsql-hackers@lists.postgresql.org; Wed, 04 Jan 2023 21:46:35 +0000 Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pDBag-0007Z6-NT for pgsql-hackers@postgresql.org; Wed, 04 Jan 2023 21:46:34 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id E938A2B066A5; Wed, 4 Jan 2023 16:46:26 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 04 Jan 2023 16:46:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1672868786; x=1672875986; bh=f PAOpeNaeHpZaz8jzwvQgWo42YSiZTum3ODhyCmfcbM=; b=BGroVyhCzqy3b9Tvb qeGn1dkvtVMhRx7P0IznI4c0xG437eVTxGtrHpMUE5Ggl5RjKLzMMu95WHEW2mWX g6oJegNfwyLe68LwJ7gadc6Wizg4VT9mzuorZvUCoaLKTQqt/0YQcDroi01AviWN hvkQwiki3F+7UMmC+VyVm3Fah3kdFnxlwtmNDiXZiKDfdDsN6kXMtukYmWGdT9Qr GUWrvo+RIMz5fs+F9QvlL6qdnaiGKcQ4CgD+n/bayy9JhcgAOqu07C/m8mY+Iwv/ VKpp+45mCb3WfgE/rDacJQF/sLRkyjgIZY1LeRRCsMxpAF/epO3QJfn68vSqNuyi SayJQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeeigdduheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtfeejnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghr rdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtohhmqeenucggtffrrg htthgvrhhnpeefjeegheetuefhveevudelueeftdejteeiffetvdduhfdtieefgfeutedt veeggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 4 Jan 2023 16:46:25 -0500 (EST) Message-ID: Date: Wed, 4 Jan 2023 22:46:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: Rework of collation code, extensibility Content-Language: en-US To: Jeff Davis , pgsql-hackers@postgresql.org References: From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 22.12.22 06:40, Jeff Davis wrote: > On Sat, 2022-12-17 at 19:14 -0800, Jeff Davis wrote: >> Attached is a new patch series. I think there are enough changes that >> this has become more of a "rework" of the collation code rather than >> just a refactoring. This is a continuation of some prior work[1][2] >> in >> a new thread given its new scope. > > Here's version 5. There are a number of fixes, and better tests, and > it's passing in CI. > > The libc hook support is still experimental, but what's working is > passing in CI, even on windows. The challenges with libc hook support > are: > > * It obviously doesn't replace all of libc, so the separation is not > as clean and there are a number of callers throughout the code that > don't necessarily care about specific collations. > > * libc relies on setlocale() / uselocale(), which is global state and > not as easy to track. > > * More platform issues (obviously) and harder to test. I'm confused by this patch set. It combines some refactoring that was previously posted with partial support for multiple ICU libraries with partial support for some new hooks. Shouldn't those be three separate threads? I think the multiple ICU libraries already does have a separate thread; how does this relate to that work? I don't know what the hooks are supposed to be for? What other locale libraries are you thinking about using this way? How can we asses whether these interfaces are sufficient for that? The refactoring patches don't look convincing just by looking at the numbers: 3 files changed, 406 insertions(+), 247 deletions(-) 6 files changed, 481 insertions(+), 150 deletions(-) 12 files changed, 400 insertions(+), 323 deletions(-) My sense is this is trying to do too many things at once, and those things are each not fully developed yet.