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 1sW3Nj-00D0qk-U9 for pgsql-general@arkaria.postgresql.org; Tue, 23 Jul 2024 00:27:55 +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 1sW3Nh-008KfQ-An for pgsql-general@arkaria.postgresql.org; Tue, 23 Jul 2024 00:27:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sW3Nh-008Kde-0D for pgsql-general@lists.postgresql.org; Tue, 23 Jul 2024 00:27:53 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sW3Ne-000wpj-Lg for pgsql-general@lists.postgresql.org; Tue, 23 Jul 2024 00:27:52 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5a156556fb4so3998427a12.3 for ; Mon, 22 Jul 2024 17:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721694469; x=1722299269; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZcABI0Je4zSkfAplZPXwuMf78p5ChIKSYAs09dUEJoE=; b=fi0wzLylZLqb8NF1u5Xx5PycdXkvQM7hlG/hHvfkxvaFRUYTS8UVhqVIGK7ODU2V9S rPzmgohuH98qxMH0R3DqJ8XhNXwd0qhUOJeQFgWj/rFcNcNER8g0x0UFGB0SYyz1fL2Q FOrgsVR5OvlOdJ7F8RaqPoIH3Gua2xqRz0SlIbIa6MZFdakEOydraRN0CN7xtnqToLvk I4n2jrZUA/VRKMtSFptKJz/NHkvPkM+s04SKMJrBhraTM7MrfG1fXIEmEI4ykkcv4Zd5 2ypIZtyHEBmTnkHqOCKQjNiuNNqy92wMYA3HOSuE5om+bZ2wfp3v02H8esivb3EMFUIi 6ZEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721694469; x=1722299269; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZcABI0Je4zSkfAplZPXwuMf78p5ChIKSYAs09dUEJoE=; b=e1djhJLDBPmwO7FU8Kc2r0gWoGPAkDwUA1TMigw8M8GV/oE43UYBFZXL1Gt8tUu2CL Je+5Y7UINtlQwPRTyxaahtSoAF16MCIAeSTcW7YOggKTwve+Z11/nqySs4ti/Khfn4Ny yotQHT1R6TQTf75wc68Lv09ynbcx2TVKepzj0ayWX+ROmUXeUFJBOFhdftSi3TahvL6Z LCK/33rOzvBJ99SpUougjvHZ4h8nglzFEsxob/ihqa0UXv/LV6jRDIdHH87k2p0B1Tou eWsSdaIKmNstBlcDOiEWI0qPZiAIX3V/hEpRNlmBT5p31oVQCaaS5pF2CtWqT9LgkvKY N5FA== X-Forwarded-Encrypted: i=1; AJvYcCXGDBIDzagGZXlj7sqoXwppDLKA7AzjH7nCh9Y7576wq8qclaM9vz5HQHA7/UCQ8iFLmQfspygnremu5TNO5WVHiWx/PrNRLKAUcPhPtrlqt1iF X-Gm-Message-State: AOJu0YylG59hkgyRPddho18XJlBHQwe7RySRnHnR5cEXjDM+5XqTUzRB c/qGOsvx4W9UDzsejoo4aQGf2RWpyE6yLBfRTKcZgNLfpUWc07eRtimbJGpHifIrDE4Es1D8AC1 ziDQr9NyVUtCNr5ljV7tVCOslJWs= X-Google-Smtp-Source: AGHT+IEELKVG3Se1iGqQ5oDF4/t9SqjJmbRsT/mCDS+iig1AuMEEhSFb33NB0wvopScmHuPN1ALZulRlHuf4bLs/HJg= X-Received: by 2002:a17:907:ea3:b0:a7a:9954:1fc1 with SMTP id a640c23a62f3a-a7a99542277mr10420766b.24.1721694468601; Mon, 22 Jul 2024 17:27:48 -0700 (PDT) MIME-Version: 1.0 References: <80c9b0ea-c874-40ad-a006-fb1eb37464c2@aklaver.com> <44b44ece-dce6-4b4f-b751-8787a5a071e0@aklaver.com> In-Reply-To: From: Thomas Munro Date: Tue, 23 Jul 2024 12:28:36 +1200 Message-ID: Subject: Re: Windows installation problem at post-install step To: Sandeep Thakkar Cc: =?UTF-8?B?RXJ0YW4gS8O8w6fDvGtvZ2x1?= , Adrian Klaver , pgsql-general@lists.postgresql.org, Dave Page Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jul 22, 2024 at 11:51=E2=80=AFPM Sandeep Thakkar wrote: > EDB's windows installer gets the locales on the system using the https://= github.com/EnterpriseDB/edb-installers/blob/REL-16/server/scripts/windows/g= etlocales/getlocales.cpp and then substitute some patterns (https://github.= com/EnterpriseDB/edb-installers/blob/REL-16/server/pgserver.xml.in#L2850) I= 'm not sure why we do that but that is the old code and probably @Dave Page= may know but I'm not sure if that piece of code is responsible for this c= hange in encoding in this case. Ah, so it's calling EnumSystemLocales(). Interestingly, the documentation for that function says: "Note For interoperability reasons, the application should prefer the EnumSystemLocalesEx function to EnumSystemLocales because Microsoft is migrating toward the use of locale names instead of locale identifiers for new locales. Any application that will be run only on Windows Vista and later should use EnumSystemLocalesEx." That seems to be talking about this exact issue, that we're supposed to be using "locale names". I'm a little confused about the terminology for the various types of names and identifiers but if you follow the link to a example program[1] you can see that it's talking about the BCP47 "en-US" kind, that we want. (That quote makes it sound like a new thing, but Vista came out ~17 years ago.) So one idea would be that in v18, we not only change initdb.exe to pick a BCP47 locale name by default as I proposed in that other thread[2], but also in the v18 version of the EDB installer you consider switching that code over to EnumSystemLocalesEx(). Then we can start to kiss goodbye to the bad old names. People would still propagate them into the future with pg_upgrade I guess, and it'd be up to users to replace them by updating their catalogs manually. Does that make sense? [1] https://learn.microsoft.com/en-us/windows/win32/intl/nls--name-based-ap= is-sample [2] https://www.postgresql.org/message-id/flat/CA%2BhUKGJ%3DXThErgAQRoqfCy1= bKPxXVuF0%3D2zDbB%2BSxDs59pv7Fw%40mail.gmail.com