Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sUaiV-004Jtn-7U for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jul 2024 23:39:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sUaiT-005u1t-3L for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jul 2024 23:39:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sUaiS-005u1k-Hp for pgsql-hackers@lists.postgresql.org; Thu, 18 Jul 2024 23:39:17 +0000 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sUaiP-000Hje-VO for pgsql-hackers@postgresql.org; Thu, 18 Jul 2024 23:39:16 +0000 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-5c691c6788eso680767eaf.2 for ; Thu, 18 Jul 2024 16:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1721345951; x=1721950751; darn=postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=BrU6iQcEconooeYcsd0/4qtDU5OPlitw+DGioIvNWms=; b=gN8RXALsqvjxjDCleZhWYjklpnpwME/5pCT6TWJAbkgpccWncXCAd6SvI099q7+Cw1 7u0BslP2RsOu6ad+OmrA7bXP4+eU+jfB0bi3SVXxGAa6+6fhRdjwQ0KmYCiauzZ1cyJd F42miMtFZIBpMfuixO/c4eRSl2ZbA4NU2KO7g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721345951; x=1721950751; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BrU6iQcEconooeYcsd0/4qtDU5OPlitw+DGioIvNWms=; b=VQpXQwEyIhg++iiwrxDrr+Ady66GAMVVqHcVuDsmFx9rws4G8nkV5dvN7axDg/4B2w SYQ6ViW4tWtA6HXEuOgoaU5Y5VxuGXGR6esDpQEqHQ2NA8A487D4Rv/uTKPiqzcCQdGj YMdnDKotCSWyCsQJWxWc4ygPLvW981jvfeXdwIs0V4e0fjrmP9ilLAR/WucgFvpDVocT vu9gMQ784s62mhcl1tZxU9ObSFpZNq0Rno9jz2a5kcKUPfWMvCQOB85HyTV0T+XvFE6R jV4hSx1OL+MxjKWTl297xOJIe2+LY8bQdJIdohtEFHf1vjNK0tEHS2/sWKiFSreh/Y2/ dhlA== X-Forwarded-Encrypted: i=1; AJvYcCXxMCwwaw1lODdbA0JN6DtpEGiVoa3NJSEC3Mm6gWX7kJmqQn1MAXMonW7S3HPIezyDaIcEyDBSU0Xkj/l84bh1LsoDvaB17TDwKqAp X-Gm-Message-State: AOJu0Yz/G2hikUXpPvOu8yE9Yvt8pRf3krppyYvhP1TBEKzPyH6qlIsA TFMQiPGDkVOGCDEykaJoPZutLW0/Mot5+2gwxa6YSsYAV8QWebK0O26H/sj5ng== X-Google-Smtp-Source: AGHT+IF2woiJsZN91lZnLwXZVkBgAV7ZRwBIu/nXA6sspmAG5Eh8VDcNGTDUaETd/+s/WCoGXpN7/w== X-Received: by 2002:a05:6820:1e18:b0:5ce:3ebb:468d with SMTP id 006d021491bc7-5d41d3b134amr7980690eaf.7.1721345951678; Thu, 18 Jul 2024 16:39:11 -0700 (PDT) Received: from google.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5d55aad097csm34845eaf.37.2024.07.18.16.39.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jul 2024 16:39:11 -0700 (PDT) Date: Thu, 18 Jul 2024 16:39:08 -0700 From: Noah Misch To: Tom Lane Cc: Jeff Davis , Laurenz Albe , Peter Eisentraut , Daniel Verite , Jeremy Schneider , Robert Haas , pgsql-hackers@postgresql.org Subject: Re: Built-in CTYPE provider Message-ID: <20240718233908.52.nmisch@google.com> References: <564325.1720297161@sss.pgh.pa.us> <20240709010545.8c.nmisch@google.com> <39a30bd36198b44ed40da271ef96a72d133c32ba.camel@j-davis.com> <20240711125040.11.nmisch@google.com> <1908b19c0a3a210935608635cad1b4eeb819c66f.camel@j-davis.com> <20240717220326.df.nmisch@google.com> <4efae9f992f96a1e8eba0f515c637c3ff252d0fc.camel@cybertec.at> <20240718140015.9b.nmisch@google.com> <3729436.1721322211@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3729436.1721322211@sss.pgh.pa.us> User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jul 18, 2024 at 01:03:31PM -0400, Tom Lane wrote: > This whole discussion seems quite bizarre to me. In the first > place, it is certain that Unicode will continue to evolve, and > I can't believe that we'd just freeze pg_c_utf8 on the current > definition forever. Whether the first change happens in v18 > or years later doesn't seem like a particularly critical point. > > In the second place, I cannot understand why pg_c_utf8 is being > held to a mutability standard that we have never applied to any > other locale-related functionality --- and indeed could not do > so, since in most cases that functionality has been buried in > libraries we don't control. It seems to me to be already a With libc and ICU providers, packagers have a way to avoid locale-related behavior changes. That's the "mutability standard" I want pg_c_utf8 to join. pg_c_utf8 is the one provider where packagers can't opt out[1] of annual pg_upgrade-time index scan breakage on affected expression indexes. > great step forward that with pg_c_utf8, at least we can guarantee > that the behavior won't change without us knowing about it. > Noah's desire to revert the feature makes the mutability situation > strictly worse, because people will have to continue to rely on > OS-provided functionality that can change at any time. I see: - one step forward: "string1 < string2" won't change, forever, regardless of packager choices - one step backward: "string ~ '[[:alpha:]]'" will change at pg_upgrade time, regardless of packager choices I think one's perspective on the relative importance of the step forward and the step backward depends on the sort of packages one uses today. Consider a user of Debian packages with locale!=C, doing Debian upgrades and pg_upgrade. For that user, pg_c_utf8 gets far less index corruption than an ICU locale. The step forward is a great step forward _for this user_, and the step backward is in the noise next to the step forward. I'm with a different kind of packager. I don't tolerate index scans returning wrong answers. To achieve that, my libc and ICU aren't changing collation behavior. I suspect my packages won't offer a newer ICU behavior until PostgreSQL gets support for multiple ICU library versions per database. (SQL Server, DB2 and Oracle already do. I agree we can't freeze forever. The multiple-versions feature gets more valuable each year.) _For this_ kind of package, the step forward is a no-op. The step backward is the sole effect on this kind of package. How much does that pair of perspectives explain the contrast between my "revert" and your "great step forward"? We may continue to disagree on the ultimate decision, but I hope I can make my position cease to appear bizarre to you. Thanks, nm [1] Daniel Verite said packagers could patch src/Makefile.global.in and run "make -C src/common/unicode update-unicode". Editing src/Makefile.global.in is modifying PostgreSQL, not configuring a packager-facing option.