Thread
-
EDB Installer initcluster script changes - review requested
Manika Singhal <manika.singhal@enterprisedb.com> — 2025-01-28T09:42:36Z
Hi, As a part of rewriting the legacy initcluster.vbs [1], which EDB's graphical installer uses to initialize the database cluster and set the proper ACL's, into Powershell script initcluster.ps1, I have also attempted to fix the locale issue (about non-ASCII characters) being discussed at [2]. Here are the test cases that I tried with the generated test installer for PG17 [3] Ensure that the ACLs of the data directories generated by the existing initcluster.vbs and the new initcluster.ps1 match, both in the default installation directory (C:\Program Files) and in non-default location (outside C:\Program Files). Ensure that the ACls of the password file and its temporary directory match those created by the existing initcluster.vbs Ensure that the ASCII and non-ASCII locales passed during the GUI based installation are converted into BCP-47 names before being passed to the initdb.exe a. example: I have selected locale "Turkish, Türkiye" at the time of installation, please refer to the screenshot below:  initcluster.ps1 converted it into its BCP-47 name, i.e. "tr-TR" and passed it to initdb.exe, please refer below installation log lines: > Executing C:\Windows\System32\cmd.exe /c powershell.exe -ExecutionPolicy Bypass -File "C:\Program Files\PostgreSQL\17\installer\server\initcluster.ps1" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users\Administrator\AppData\Local\Temp\2\postgresql_installer_cd746730f8" "C:\Program Files\PostgreSQL\17" "C:\Program Files\PostgreSQL\17\data" 5432 "Turkish,Türkiye" 0 > Script exit code: 0 > Script output: > <some script output lines> > The database cluster will be initialized with locale "tr-TR". > The default text search configuration will be set to "turkish". Can I request you all to please review the pull request at https://github.com/EnterpriseDB/edb-installers/pull/227? Thanks! [1] https://github.com/EnterpriseDB/edb-installers/issues/98 [2] https://www.postgresql.org/message-id/CA+hUKGL5mBN3JQuebAPbX0yxDNtpui04J+KSy2F7KBbhLGaJig@mail.gmail.com [3] https://get.enterprisedb.com/test-installers/postgresql-17.2-0.0snapshot12949906433.1091.1.3b995e2.3-windows-x64.exe -------------------------------- Thanks & Regards Manika Singhal EDB Pune
-
Re: EDB Installer initcluster script changes - review requested
Manika Singhal <manika.singhal@enterprisedb.com> — 2025-01-28T18:18:43Z
On Tue, Jan 28, 2025 at 3:12 PM Manika Singhal < manika.singhal@enterprisedb.com> wrote: > Hi, > > As a part of rewriting the legacy *initcluster.vbs* [1], which EDB's > graphical installer uses to initialize the database cluster and set the > proper ACL's, into Powershell script *initcluster.ps1,* I have also > attempted to fix the locale issue (about non-ASCII characters) being > discussed at [2]. > > Here are the test cases that I tried with the generated test installer for > PG17 [3] > > 1. Ensure that the ACLs of the data directories generated by the > existing initcluster.vbs and the new *initcluster.ps1* match, both in > the default installation directory (C:\Program Files) and in non-default > location (outside C:\Program Files). > 2. Ensure that the ACls of the password file and its temporary > directory match those created by the existing initcluster.vbs > 3. Ensure that the ASCII and non-ASCII locales passed during the GUI > based installation are converted into BCP-47 names before being passed to > the initdb.exe > a. *example:* I have selected locale "Turkish, Türkiye" at the time of > installation, please refer to the screenshot below: > [image: ss.png] > > *initcluster.ps1* converted it into its BCP-47 name, i.e. "tr-TR" and > passed it to initdb.exe, please refer below installation log lines: > > >> *Executing C:\Windows\System32\cmd.exe /c powershell.exe -ExecutionPolicy >> Bypass -File "C:\Program >> Files\PostgreSQL\17\installer\server\initcluster.ps1" "NT >> AUTHORITY\NetworkService" "postgres" "****" >> "C:\Users\Administrator\AppData\Local\Temp\2\postgresql_installer_cd746730f8" >> "C:\Program Files\PostgreSQL\17" "C:\Program Files\PostgreSQL\17\data" 5432 >> "Turkish,Türkiye" 0**Script exit code: 0* >> Script output: >> <some script output lines> >> >> *The database cluster will be initialized with locale "tr-TR".**The >> default text search configuration will be set to "turkish".* > > > Can I request you all to please review the pull request at > https://github.com/EnterpriseDB/edb-installers/pull/227? > > Thanks! > > > [1] https://github.com/EnterpriseDB/edb-installers/issues/98 > > [2] > https://www.postgresql.org/message-id/CA+hUKGL5mBN3JQuebAPbX0yxDNtpui04J+KSy2F7KBbhLGaJig@mail.gmail.com > > [3] > https://get.enterprisedb.com/test-installers/postgresql-17.2-0.0snapshot12949906433.1091.1.3b995e2.3-windows-x64.exe > > > Here is the link to the updated installer with a fix: [3] https://get.enterprisedb.com/test-installers/postgresql-17.2-0.0snapshot13015478730.1095.1.3b995e2.3-windows-x64.exe > > -------------------------------- > Thanks > Manika Singhal >
-
Re: EDB Installer initcluster script changes - review requested
Vladlen Popolitov <v.popolitov@postgrespro.ru> — 2025-01-28T18:21:50Z
Manika Singhal писал(а) 2025-01-28 16:42: > Hi, > "C:\Users\Administrator\AppData\Local\Temp\2\postgresql_installer_cd746730f8" >> "C:\Program Files\PostgreSQL\17" "C:\Program >> Files\PostgreSQL\17\data" 5432 "Turkish,Türkiye" 0 Hi! Your example has not-ascii characters in command line. It is not good practice. If user switched on "Use UTF-8" flag in locale settings (it is user's right to do it on own computer), it forces all commands use UTF-8 characters in command line. "Türkiye" will be transformed to wrong text by exec system call. "Use UTF-8" flag appeared in Windows 10. It helps correctly input and output UTF-8 text (including correct behaviour of psql.exe utility under Windows). As consequence, it consider as obsolete all programs that uses national chars in command line or do not expect UTF-8 in command line. > -------------------------------- > Thanks & Regards > Manika Singhal > EDB Pune > > > > Links: > ------ > [1] https://github.com/EnterpriseDB/edb-installers/issues/98 > [2] > https://www.postgresql.org/message-id/CA+hUKGL5mBN3JQuebAPbX0yxDNtpui04J+KSy2F7KBbhLGaJig@mail.gmail.com -- Best regards, Vladlen Popolitov.
-
Re: EDB Installer initcluster script changes - review requested
Kashif Zeeshan <kashi.zeeshan@gmail.com> — 2025-01-29T07:23:28Z
Hi Manika The bug is fixed with the shared package. Thanks Kashif Zeehsan On Tue, Jan 28, 2025 at 11:19 PM Manika Singhal < manika.singhal@enterprisedb.com> wrote: > On Tue, Jan 28, 2025 at 3:12 PM Manika Singhal < > manika.singhal@enterprisedb.com> wrote: > >> Hi, >> >> As a part of rewriting the legacy *initcluster.vbs* [1], which EDB's >> graphical installer uses to initialize the database cluster and set the >> proper ACL's, into Powershell script *initcluster.ps1,* I have also >> attempted to fix the locale issue (about non-ASCII characters) being >> discussed at [2]. >> >> Here are the test cases that I tried with the generated test installer >> for PG17 [3] >> >> 1. Ensure that the ACLs of the data directories generated by the >> existing initcluster.vbs and the new *initcluster.ps1* match, both in >> the default installation directory (C:\Program Files) and in non-default >> location (outside C:\Program Files). >> 2. Ensure that the ACls of the password file and its temporary >> directory match those created by the existing initcluster.vbs >> 3. Ensure that the ASCII and non-ASCII locales passed during the GUI >> based installation are converted into BCP-47 names before being passed to >> the initdb.exe >> a. *example:* I have selected locale "Turkish, Türkiye" at the time >> of installation, please refer to the screenshot below: >> [image: ss.png] >> >> *initcluster.ps1* converted it into its BCP-47 name, i.e. "tr-TR" and >> passed it to initdb.exe, please refer below installation log lines: >> >> >>> *Executing C:\Windows\System32\cmd.exe /c powershell.exe >>> -ExecutionPolicy Bypass -File "C:\Program >>> Files\PostgreSQL\17\installer\server\initcluster.ps1" "NT >>> AUTHORITY\NetworkService" "postgres" "****" >>> "C:\Users\Administrator\AppData\Local\Temp\2\postgresql_installer_cd746730f8" >>> "C:\Program Files\PostgreSQL\17" "C:\Program Files\PostgreSQL\17\data" 5432 >>> "Turkish,Türkiye" 0**Script exit code: 0* >>> Script output: >>> <some script output lines> >>> >>> *The database cluster will be initialized with locale "tr-TR".**The >>> default text search configuration will be set to "turkish".* >> >> >> Can I request you all to please review the pull request at >> https://github.com/EnterpriseDB/edb-installers/pull/227? >> >> Thanks! >> >> >> [1] https://github.com/EnterpriseDB/edb-installers/issues/98 >> >> [2] >> https://www.postgresql.org/message-id/CA+hUKGL5mBN3JQuebAPbX0yxDNtpui04J+KSy2F7KBbhLGaJig@mail.gmail.com >> >> [3] >> https://get.enterprisedb.com/test-installers/postgresql-17.2-0.0snapshot12949906433.1091.1.3b995e2.3-windows-x64.exe >> >> >> > Here is the link to the updated installer with a fix: > [3] > https://get.enterprisedb.com/test-installers/postgresql-17.2-0.0snapshot13015478730.1095.1.3b995e2.3-windows-x64.exe > > >> >> > -------------------------------- >> Thanks >> Manika Singhal >> >
-
Re: EDB Installer initcluster script changes - review requested
Sandeep Thakkar <sandeep.thakkar@enterprisedb.com> — 2025-01-29T12:59:21Z
Hi On Wed, Jan 29, 2025 at 12:53 PM Kashif Zeeshan <kashi.zeeshan@gmail.com> wrote: > Hi Manika > > The bug is fixed with the shared package. > > Just to be sure, you're talking about the issue where EDB's installer was passing the locale with non-ascii characters and was failing, correct? > Thanks > Kashif Zeehsan > > On Tue, Jan 28, 2025 at 11:19 PM Manika Singhal < > manika.singhal@enterprisedb.com> wrote: > >> On Tue, Jan 28, 2025 at 3:12 PM Manika Singhal < >> manika.singhal@enterprisedb.com> wrote: >> >>> Hi, >>> >>> As a part of rewriting the legacy *initcluster.vbs* [1], which EDB's >>> graphical installer uses to initialize the database cluster and set the >>> proper ACL's, into Powershell script *initcluster.ps1,* I have also >>> attempted to fix the locale issue (about non-ASCII characters) being >>> discussed at [2]. >>> >>> Here are the test cases that I tried with the generated test installer >>> for PG17 [3] >>> >>> 1. Ensure that the ACLs of the data directories generated by the >>> existing initcluster.vbs and the new *initcluster.ps1* match, both >>> in the default installation directory (C:\Program Files) and in non-default >>> location (outside C:\Program Files). >>> 2. Ensure that the ACls of the password file and its temporary >>> directory match those created by the existing initcluster.vbs >>> 3. Ensure that the ASCII and non-ASCII locales passed during the GUI >>> based installation are converted into BCP-47 names before being passed to >>> the initdb.exe >>> a. *example:* I have selected locale "Turkish, Türkiye" at the time >>> of installation, please refer to the screenshot below: >>> [image: ss.png] >>> >>> *initcluster.ps1* converted it into its BCP-47 name, i.e. "tr-TR" and >>> passed it to initdb.exe, please refer below installation log lines: >>> >>> >>>> *Executing C:\Windows\System32\cmd.exe /c powershell.exe >>>> -ExecutionPolicy Bypass -File "C:\Program >>>> Files\PostgreSQL\17\installer\server\initcluster.ps1" "NT >>>> AUTHORITY\NetworkService" "postgres" "****" >>>> "C:\Users\Administrator\AppData\Local\Temp\2\postgresql_installer_cd746730f8" >>>> "C:\Program Files\PostgreSQL\17" "C:\Program Files\PostgreSQL\17\data" 5432 >>>> "Turkish,Türkiye" 0**Script exit code: 0* >>>> Script output: >>>> <some script output lines> >>>> >>>> *The database cluster will be initialized with locale "tr-TR".**The >>>> default text search configuration will be set to "turkish".* >>> >>> >>> Can I request you all to please review the pull request at >>> https://github.com/EnterpriseDB/edb-installers/pull/227? >>> >>> Thanks! >>> >>> >>> [1] https://github.com/EnterpriseDB/edb-installers/issues/98 >>> >>> [2] >>> https://www.postgresql.org/message-id/CA+hUKGL5mBN3JQuebAPbX0yxDNtpui04J+KSy2F7KBbhLGaJig@mail.gmail.com >>> >>> [3] >>> https://get.enterprisedb.com/test-installers/postgresql-17.2-0.0snapshot12949906433.1091.1.3b995e2.3-windows-x64.exe >>> >>> >>> >> Here is the link to the updated installer with a fix: >> [3] >> https://get.enterprisedb.com/test-installers/postgresql-17.2-0.0snapshot13015478730.1095.1.3b995e2.3-windows-x64.exe >> >> >>> >>> >> -------------------------------- >>> Thanks >>> Manika Singhal >>> >> -- Sandeep Thakkar
-
Re: EDB Installer initcluster script changes - review requested
Kashif Zeeshan <kashi.zeeshan@gmail.com> — 2025-01-29T13:00:32Z
On Wed, Jan 29, 2025 at 5:59 PM Sandeep Thakkar < sandeep.thakkar@enterprisedb.com> wrote: > Hi > > On Wed, Jan 29, 2025 at 12:53 PM Kashif Zeeshan <kashi.zeeshan@gmail.com> > wrote: > >> Hi Manika >> >> The bug is fixed with the shared package. >> >> Just to be sure, you're talking about the issue where EDB's installer was > passing the locale with non-ascii characters and was failing, correct? > Yes > > > >> Thanks >> Kashif Zeehsan >> >> On Tue, Jan 28, 2025 at 11:19 PM Manika Singhal < >> manika.singhal@enterprisedb.com> wrote: >> >>> On Tue, Jan 28, 2025 at 3:12 PM Manika Singhal < >>> manika.singhal@enterprisedb.com> wrote: >>> >>>> Hi, >>>> >>>> As a part of rewriting the legacy *initcluster.vbs* [1], which EDB's >>>> graphical installer uses to initialize the database cluster and set the >>>> proper ACL's, into Powershell script *initcluster.ps1,* I have also >>>> attempted to fix the locale issue (about non-ASCII characters) being >>>> discussed at [2]. >>>> >>>> Here are the test cases that I tried with the generated test installer >>>> for PG17 [3] >>>> >>>> 1. Ensure that the ACLs of the data directories generated by the >>>> existing initcluster.vbs and the new *initcluster.ps1* match, both >>>> in the default installation directory (C:\Program Files) and in non-default >>>> location (outside C:\Program Files). >>>> 2. Ensure that the ACls of the password file and its temporary >>>> directory match those created by the existing initcluster.vbs >>>> 3. Ensure that the ASCII and non-ASCII locales passed during the >>>> GUI based installation are converted into BCP-47 names before being passed >>>> to the initdb.exe >>>> a. *example:* I have selected locale "Turkish, Türkiye" at the time >>>> of installation, please refer to the screenshot below: >>>> [image: ss.png] >>>> >>>> *initcluster.ps1* converted it into its BCP-47 name, i.e. "tr-TR" and >>>> passed it to initdb.exe, please refer below installation log lines: >>>> >>>> >>>>> *Executing C:\Windows\System32\cmd.exe /c powershell.exe >>>>> -ExecutionPolicy Bypass -File "C:\Program >>>>> Files\PostgreSQL\17\installer\server\initcluster.ps1" "NT >>>>> AUTHORITY\NetworkService" "postgres" "****" >>>>> "C:\Users\Administrator\AppData\Local\Temp\2\postgresql_installer_cd746730f8" >>>>> "C:\Program Files\PostgreSQL\17" "C:\Program Files\PostgreSQL\17\data" 5432 >>>>> "Turkish,Türkiye" 0**Script exit code: 0* >>>>> Script output: >>>>> <some script output lines> >>>>> >>>>> *The database cluster will be initialized with locale "tr-TR".**The >>>>> default text search configuration will be set to "turkish".* >>>> >>>> >>>> Can I request you all to please review the pull request at >>>> https://github.com/EnterpriseDB/edb-installers/pull/227? >>>> >>>> Thanks! >>>> >>>> >>>> [1] https://github.com/EnterpriseDB/edb-installers/issues/98 >>>> >>>> [2] >>>> https://www.postgresql.org/message-id/CA+hUKGL5mBN3JQuebAPbX0yxDNtpui04J+KSy2F7KBbhLGaJig@mail.gmail.com >>>> >>>> [3] >>>> https://get.enterprisedb.com/test-installers/postgresql-17.2-0.0snapshot12949906433.1091.1.3b995e2.3-windows-x64.exe >>>> >>>> >>>> >>> Here is the link to the updated installer with a fix: >>> [3] >>> https://get.enterprisedb.com/test-installers/postgresql-17.2-0.0snapshot13015478730.1095.1.3b995e2.3-windows-x64.exe >>> >>> >>>> >>>> >>> -------------------------------- >>>> Thanks >>>> Manika Singhal >>>> >>> > > -- > Sandeep Thakkar > > >
-
Re: EDB Installer initcluster script changes - review requested
Manika Singhal <manika.singhal@enterprisedb.com> — 2025-01-29T15:04:28Z
On Tue, Jan 28, 2025 at 11:52 PM Vladlen Popolitov < v.popolitov@postgrespro.ru> wrote: > Manika Singhal писал(а) 2025-01-28 16:42: > > Hi, > > > > "C:\Users\Administrator\AppData\Local\Temp\2\postgresql_installer_cd746730f8" > >> "C:\Program Files\PostgreSQL\17" "C:\Program > >> Files\PostgreSQL\17\data" 5432 "Turkish,Türkiye" 0 > > Hi! > > Your example has not-ascii characters in command line. It is not good > practice. > If user switched on "Use UTF-8" flag in locale settings (it is user's > right to do it > on own computer), it forces all commands > use UTF-8 characters in command line. "Türkiye" will be transformed to > wrong text > by exec system call. > > "Use UTF-8" flag appeared in Windows 10. It helps correctly input and > output > UTF-8 text (including correct behaviour of psql.exe utility under > Windows). > As consequence, it consider as obsolete all programs that uses national > chars in command line or do not expect UTF-8 in command line. > > Hi Vladlen, I appreciate your input -- thank you! I tested the installer with the "Use UTF-8" flag enabled in the locale settings of my VM, and it worked as expected in that setup as well. The EDB installer provides a drop-down list of locales that include options with non-ascii characters (as shown in the screenshot I shared in my initial email). >From there our script picks the locale containing non-ascii characters and converts it into BCP-47 code before using it for database initialization. Based on this, the UTF-8 setting does not appear to affect the installer. However, I would appreciate it if you could try the installation using the test-installer shared earlier, and let me know if you encounter any issues. > -------------------------------- > > Thanks > > Manika Singhal > > > > > > > > Links: > > ------ > > [1] https://github.com/EnterpriseDB/edb-installers/issues/98 > > [2] > > > https://www.postgresql.org/message-id/CA+hUKGL5mBN3JQuebAPbX0yxDNtpui04J+KSy2F7KBbhLGaJig@mail.gmail.com > > -- > Best regards, > > Vladlen Popolitov. >
-
Re: EDB Installer initcluster script changes - review requested
Sandeep Thakkar <sandeep.thakkar@enterprisedb.com> — 2025-02-05T06:30:11Z
Hi Manika, The final patch looks fine to me. Hopefully, it'll be included in the upcoming minor releases. It'll help a lot of users who use installers with the locale containing non-ascii characters. On Wed, Jan 29, 2025 at 8:34 PM Manika Singhal < manika.singhal@enterprisedb.com> wrote: > > On Tue, Jan 28, 2025 at 11:52 PM Vladlen Popolitov < > v.popolitov@postgrespro.ru> wrote: > >> Manika Singhal писал(а) 2025-01-28 16:42: >> > Hi, >> >> > >> "C:\Users\Administrator\AppData\Local\Temp\2\postgresql_installer_cd746730f8" >> >> "C:\Program Files\PostgreSQL\17" "C:\Program >> >> Files\PostgreSQL\17\data" 5432 "Turkish,Türkiye" 0 >> >> Hi! >> >> Your example has not-ascii characters in command line. It is not good >> practice. >> If user switched on "Use UTF-8" flag in locale settings (it is user's >> right to do it >> on own computer), it forces all commands >> use UTF-8 characters in command line. "Türkiye" will be transformed to >> wrong text >> by exec system call. >> >> "Use UTF-8" flag appeared in Windows 10. It helps correctly input and >> output >> UTF-8 text (including correct behaviour of psql.exe utility under >> Windows). >> As consequence, it consider as obsolete all programs that uses national >> chars in command line or do not expect UTF-8 in command line. >> >> Hi Vladlen, > > I appreciate your input -- thank you! > I tested the installer with the "Use UTF-8" flag enabled in the locale > settings of my VM, > and it worked as expected in that setup as well. > The EDB installer provides a drop-down list of locales that include > options with > non-ascii characters (as shown in the screenshot I shared in my initial > email). > From there our script picks the locale containing non-ascii characters and > converts it into BCP-47 code before using it for database initialization. > Based on this, the UTF-8 setting does not appear to affect the installer. > However, I would appreciate it if you could try the installation using the > test-installer shared earlier, > and let me know if you encounter any issues. > > > -------------------------------- >> > Thanks >> > Manika Singhal >> > >> > >> > >> > Links: >> > ------ >> > [1] https://github.com/EnterpriseDB/edb-installers/issues/98 >> > [2] >> > >> https://www.postgresql.org/message-id/CA+hUKGL5mBN3JQuebAPbX0yxDNtpui04J+KSy2F7KBbhLGaJig@mail.gmail.com >> >> -- >> Best regards, >> >> Vladlen Popolitov. >> > -- Sandeep Thakkar