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 1u4irz-006QTz-Ik for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Apr 2025 16:10:44 +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 1u4irx-00CkfT-AJ for pgsql-bugs@arkaria.postgresql.org; Tue, 15 Apr 2025 16:10:42 +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 1u4irw-00CkfH-R9 for pgsql-bugs@lists.postgresql.org; Tue, 15 Apr 2025 16:10:41 +0000 Received: from bumble.birch.relay.mailchannels.net ([23.83.209.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u4irt-000Ez5-1A for pgsql-bugs@lists.postgresql.org; Tue, 15 Apr 2025 16:10:41 +0000 X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A802584556F; Tue, 15 Apr 2025 16:10:35 +0000 (UTC) Received: from pdx1-sub0-mail-a272.dreamhost.com (trex-3.trex.outbound.svc.cluster.local [100.110.51.173]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 1005184500A; Tue, 15 Apr 2025 16:10:35 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1744733435; a=rsa-sha256; cv=none; b=6zRCCbkHFk+oTFxZtDk3xeyD+9Q3uKzv7k3Jyf8z/+h8jiWNAPK4Zhv8xNzp/1v/PkRc8D u3fO3iKwszrEu6ZQSvuSdGEdHnwOwEpC199heC/PGANawhC16sZL+dZfjxHAlZriUWi647 KC387iXdp2wnXQjhUg0SbzhZCMevnG4SxR8lLzATdu7Uw7F4hHB+EiIDDRVZTOvvrYXXkp fRRPXrPYHdzOwNWl6GBVEgU0BKM1L/Ec6zPni4sCo/w8Qd7MTxJCqOG3iLW9dvpOapPgqq xlQ1ytCcw+0yJBmmaeSvPmz1pbv8yocfglbijqeV2lNWVfZZ8manXJ7X9XiKOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1744733435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WQlQYtWitPCkefeC7sfCKuYYbTEb7f/54MmzrWWKsxE=; b=E57TrVlR9l+vBIZvuFXytT/TgsZpWeWjRYfCSuQDsMaoIeY2PHthkUEHeK1cggIFaD117o DXbxgOMnUuN127+XgKZUDw6svFTa0rL65BwWFmb2SeQofGomLP08FPB0uipJyv7QiVnVzv ino7aTHqXDqTWxeewQQsPFJzmjEuqibOVz+HEebZeXdpmiP+QzvtEQ0BX0P6cu82muGPaV Gvoyh0rdeyKPONeCpSNgFKP//tFWQNQUwf1wsEwg5jerPJCI8u7zMIUmAWyhx6nlLZU9Qk OeMzUwYd8C0MdqMMx7S5fA4zQTo1N5X/5OpH9gZa+oTeWa1Xrej9rjzYWBWvbA== ARC-Authentication-Results: i=1; rspamd-5dd7f8b4cd-4lxll; auth=pass smtp.auth=dreamhost smtp.mailfrom=nico@cryptonector.com X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|nico@cryptonector.com X-MailChannels-Auth-Id: dreamhost X-White-Whistle: 023149e05e6c532f_1744733435355_466111646 X-MC-Loop-Signature: 1744733435355:3863064406 X-MC-Ingress-Time: 1744733435355 Received: from pdx1-sub0-mail-a272.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.110.51.173 (trex/7.0.3); Tue, 15 Apr 2025 16:10:35 +0000 Received: from ubby (syn-075-081-095-064.res.spectrum.com [75.81.95.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a272.dreamhost.com (Postfix) with ESMTPSA id 4ZcTf16LSXz16; Tue, 15 Apr 2025 09:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cryptonector.com; s=dreamhost; t=1744733434; bh=WQlQYtWitPCkefeC7sfCKuYYbTEb7f/54MmzrWWKsxE=; h=Date:From:To:Cc:Subject:Content-Type:Content-Transfer-Encoding; b=mTNLMh8Utu/dyB+9kI5l8ANmQY0P9FiqK1ZUrkzJnx7K/k9eBY2utssnXlxAoVsC2 S73L/PCH6eDWJkJ9rDsFt4EBjKFjVpPiBO82i5m3rBZQeAYGVgYBKos8HT3R6LkN0t xGo4gmqS8ICbYlRtfvOfEppzy8JHi2dErqdHuweAqBzUycCu5usFJq8hC32AXFAUpW ZLp9sgv9JhXrOCqWMLzbKJAevzjR53pO+uGZj45M2ijH/aIg2M2i761W7NKJlXMRvr nLCRX/qV8N5EMzARdrAONed3n6Wf/C3EvQJ457EMgAnKdAc4U3JQ03kKhXSWEoOdwe fQk6lCcpEI+Ng== Date: Tue, 15 Apr 2025 11:10:31 -0500 From: Nico Williams To: Thomas Munro Cc: Laurenz Albe , Avi Uziel , Manika Singhal , Ben Caspi , pgsql-bugs@lists.postgresql.org, Liran Amrani , Shahar Amram , Sandeep Thakkar , tgl@sss.pgh.pa.us Subject: Re: PostgreSQL v15.12 fails to perform PG_UPGRADE from v13 and v9 on Windows Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 10, 2025 at 11:49:18AM +1200, Thomas Munro wrote: > On Tue, Apr 8, 2025 at 5:50 PM Laurenz Albe wrote: > > I think that we should stick with BCP-47 locale names as much as > > possible. The problem with the long locale names is not only > > non-ASCII characters, but that Microsoft keeps changing these names, > > and PostgreSQL persists them in the catalog, which causes trouble if > > Windows is upgraded. > > +100 With respect, BCP-47 defines language tags, not locale names. A locale name definitely needs a way to identify a language, so BCP-47 can be part of a locale identifier, but a locale needs more than that: it also needs a way to identify the codeset used in that locale. The original post in this thread had postgres using `English_United States.1252` as the locale name, no part of which is BCP-47-like, but also BCP-47 has no way of encoding "codepage 1252" as the codeset because BCP-47 is specifically and only about languages, not codesets. I'm not actually sure what is the best standard to use for identifying _locales_ as opposed to _languages_, but BCP-47 isn't it. POSIX has a notion of locales, but not registry of locale names and definitions. POSIX locale naming using BCP-47 language tags and some codeset identifier seems like the best way, but unlike BCP-47 there is no IANA registry of locale names, but there is an IANA registry of codesets: https://www.iana.org/assignments/character-sets/character-sets.xhtml (which isn't quite a registry of codeset names but it will do) so you can construct a standard-ish locale name out of language tags and charset/codeset names. I believe -correct me if I'm wrong- that the IETF is not interested in publishing an RFCs/BCPs/STDs regarding locales, nor having an IANA locale name registry, because the IETF wants the world to use Unicode and standard Unicode transforms like UTF-8, in which case BCP-47 should be enough (because the transform should be understood from context). But the real world still has to deal with non-Unicode codesets and, therefore with locales. The CLDR uses some sort of locale name, but still without a codeset name (because CLDR is about everything about locales except the codeset name because Unicode), and glibc can be used as a sort of source of standard-ish POSIX locale names that do include codeset names. So if you want to identify _locales_ you might have to either construct your own locale names out of BCP-47 or CLDR and add a codeset name subtag, or use glibc's POSIX locale names augmented with Windows codepage names. Nico --