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 1sbHZ8-00FQaJ-8c for pgsql-general@arkaria.postgresql.org; Tue, 06 Aug 2024 10:37:18 +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 1sbHZ5-00DCmn-41 for pgsql-general@arkaria.postgresql.org; Tue, 06 Aug 2024 10:37:15 +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 1sbHZ4-00DCeK-Jp for pgsql-general@lists.postgresql.org; Tue, 06 Aug 2024 10:37:14 +0000 Received: from mail-yb1-xb2f.google.com ([2607:f8b0:4864:20::b2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sbHZ0-003RkI-NW for pgsql-general@lists.postgresql.org; Tue, 06 Aug 2024 10:37:13 +0000 Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-dfef5980a69so502216276.3 for ; Tue, 06 Aug 2024 03:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1722940628; x=1723545428; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7o9ZjU0rf+xgenW2Ojv6XcDoPpokAlX6NOxbfzWGnxE=; b=S4UmAz7ywURZfqz6ipsZq6jinUBSg3JKGIY2G2A1nunZhap42eGCDuwDwlCnOVX/vf Ij1btwf7uTd8u8ScOz0lRjp8XDGSvwczml4Z8va8beMzpA5b/grglchAicrFH3Vnp1zg V1QK5hd2BKAeYyCvvRbrA5IQ/85XyM4VwAPuzAh+EaI46jqDMvMzei1fZq+y2zh9e4um ct/vKbChfy3FvuIbVQRwMVXdXBIJQFZEJ1e8L7vAiSi5XRkObyZ4GC1kA4Fj+npjNoKY EZl3fECeq6q957MC6rEDA6SHUTodpUKYDT6EdYubnQvjWfuEUMwZ6upHlu0DXz7xqjKL P6SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722940628; x=1723545428; h=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=7o9ZjU0rf+xgenW2Ojv6XcDoPpokAlX6NOxbfzWGnxE=; b=B9rPUoy+O3B+WQdi757WSQOPPjPzfR89lWUDilX/m1wo7YhFwZzqtrkcRivP3iko4i fsXNkjCfWphDNxOwDBuJeaC3Ez4wwOKhbmjMm4fncdwmM8qLNJUJ7l864Vb46f+K0+Nh bFtFBmv9Roo86DvH0hJstcE3629OQadp14CPdYB8bjI7yi0ITmzeC/fD39cQKoud9wnJ 3PeM7KyC5zUlMtSJnp7CpPQxPTYS7lDLBkm90PBTqDI9tG2xH/fCpgnL9yM15QMXVR0o MS6JMZ1c395v0rNuT90OPAHlgIcq10oVj1dB6CqSAjkAETs+LqodoMpmVzYoKiP/Xb8l GdtQ== X-Forwarded-Encrypted: i=1; AJvYcCUKb3O1x5TRknrIJ//qN34wsXUukDXHmt1zRXuAmAj9e6kor13QpQI1iKjn67R7DmyJzFoxTukMlISoiBjMESs8Vy6c47URN6By0jw31Vc+WqJm X-Gm-Message-State: AOJu0Yy5fVlizXIRnPpfLLZI8oRRp1DLqD7DuheNM1iG7WkvkeyACg6Y oSQ544DFYyHYPPAuE4Py2bipddTaFizEN+WvdB0rddlRskc9UaO4pj50hnmxrJk8VzKE9Uwk+Ra xKRrGlUNYscvgJGzd8btTjzV6INiJLxaBBpoG X-Google-Smtp-Source: AGHT+IFZQj2o4uEcs3Do5reQp3s5xWlmAZMLHVBh4S1Sh/dLvoxI47EBU6pYXuGcYQbaYKE5OwxRR2W0AoiCyZOb3Ck= X-Received: by 2002:a25:98c6:0:b0:e0b:c5a0:db16 with SMTP id 3f1490d57ef6-e0bde2895a7mr14276463276.13.1722940628187; Tue, 06 Aug 2024 03:37:08 -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: Sandeep Thakkar Date: Tue, 6 Aug 2024 16:06:51 +0530 Message-ID: Subject: Re: Windows installation problem at post-install step To: Thomas Munro Cc: =?UTF-8?B?RXJ0YW4gS8O8w6fDvGtvZ2x1?= , Adrian Klaver , pgsql-general@lists.postgresql.org, Manika Singhal Content-Type: multipart/alternative; boundary="0000000000001cdc5a061f0160d9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000001cdc5a061f0160d9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Aug 6, 2024 at 10:57=E2=80=AFAM Thomas Munro wrote: > On Mon, Aug 5, 2024 at 8:50=E2=80=AFPM Sandeep Thakkar > wrote: > > This issue is seen only on v16 and not the back branches (tested on 15 > and 14) and also confirmed by @Ertan K=C3=BC=C3=A7=C3=BCkoglu at > https://github.com/EnterpriseDB/edb-installers/issues/127#issuecomment-22= 68371442 > > Does that mean you can reproduce the problem with initdb.exe directly > in a shell? That is, remove the EDB installer from the picture and > compare v15 and v16 with the exact command line options that > initcluster.vbs is using, or perhaps just: > > initdb.exe --locale=3D"Turkish,T=C3=BCrkiye" --encoding=3DUTF-8 -D pgdata > > yes, here is the output: > c:\Program Files\PostgreSQL\16\bin>initdb.exe --encoding=3DUTF-8 -A > scram-sha-256 -U postgres -D "c:\Program Files\PostgreSQL\16\data" --loca= le > "Turkish,T=C3=BCrkiye" -W > The files belonging to this database system will be owned by user > "sandeep". > This user must also own the server process. > > The database cluster will be initialized with locale > "Turkish_T=C3=BCrkiye.1254". > The default text search configuration will be set to "turkish". > > Data page checksums are disabled. > > Enter new superuser password: > Enter it again: > > fixing permissions on existing directory c:/Program > Files/PostgreSQL/16/data ... ok > creating subdirectories ... ok > selecting dynamic shared memory implementation ... windows > selecting default max_connections ... 100 > selecting default shared_buffers ... 128MB > selecting default time zone ... UTC > creating configuration files ... ok > running bootstrap script ... ok > performing post-bootstrap initialization ... child process was terminated > by exception 0xC0000409 > initdb: removing contents of data directory "c:/Program > Files/PostgreSQL/16/data" > > . o O (Why does that locale name have a comma?) If v15 works and v16 > breaks, perhaps you could try comparing the output with the attached > patch? It will give a hex dump of the contents of the locale name at > various points in the program, to see if/where it was corrupted, which > might also be a bit less confusing than looking at script output via > email (I don't even know how many onion layers of transcoding are > involved...) > here is the output: v15: c:\Program Files\PostgreSQL\15\bin>initdb.exe --encoding=3DUTF-8 -A > scram-sha-256 -U postgres -D "c:\Program Files\PostgreSQL\15\data" --loca= le > "Turkish,T=C3=BCrkiye" -W > XXX debug raw: getopt optarg =3D "Turkish,T=C3=BCrkiye" > XXX debug hex: getopt optarg =3D { 54 75 72 6b 69 73 68 2c 54 fc 72 6b 6= 9 > 79 65 } > XXX debug txt: getopt optarg =3D { T u r k i s h , T ? r k i= y > e } > XXX debug raw: getopt optarg =3D "Turkish,T=C3=BCrkiye" > XXX debug hex: getopt optarg =3D { 54 75 72 6b 69 73 68 2c 54 fc 72 6b 6= 9 > 79 65 } > XXX debug txt: getopt optarg =3D { T u r k i s h , T ? r k i= y > e } > The files belonging to this database system will be owned by user > "sandeep". > This user must also own the server process. > > XXX debug raw: setlocales lc_ctype =3D "Turkish,T=C3=BCrkiye" > XXX debug hex: setlocales lc_ctype =3D { 54 75 72 6b 69 73 68 2c 54 fc 7= 2 > 6b 69 79 65 } > XXX debug txt: setlocales lc_ctype =3D { T u r k i s h , T ? r= k > i y e } > XXX debug raw: setlocales cannonname =3D "Turkish_T=C3=BCrkiye.1254" > XXX debug hex: setlocales cannonname =3D { 54 75 72 6b 69 73 68 5f 54 fc= 72 > 6b 69 79 65 2e 31 32 35 34 } > XXX debug txt: setlocales cannonname =3D { T u r k i s h _ T ? = r > k i y e . 1 2 5 4 } > XXX debug raw: setup_locale_encoding =3D "Turkish_T=C3=BCrkiye.1254" > XXX debug hex: setup_locale_encoding =3D { 54 75 72 6b 69 73 68 5f 54 fc= 72 > 6b 69 79 65 2e 31 32 35 34 } > XXX debug txt: setup_locale_encoding =3D { T u r k i s h _ T ? = r > k i y e . 1 2 5 4 } > The database cluster will be initialized with locale > "Turkish_T=C3=BCrkiye.1254". > The default text search configuration will be set to "turkish". > > Data page checksums are disabled. > > Enter new superuser password: > Enter it again: > > fixing permissions on existing directory c:/Program > Files/PostgreSQL/15/data ... ok > creating subdirectories ... ok > selecting dynamic shared memory implementation ... windows > selecting default max_connections ... 100 > selecting default shared_buffers ... 128MB > selecting default time zone ... UTC > creating configuration files ... ok > running bootstrap script ... ok > performing post-bootstrap initialization ... ok > syncing data to disk ... ok > > Success. You can now start the database server using: > > pg_ctl -D ^"c^:^\Program^ Files^\PostgreSQL^\15^\data^" -l logfile > start > v16: > C:\Program Files\PostgreSQL\16\bin>initdb.exe --encoding=3DUTF-8 -A > scram-sha-256 -U postgres -D "c:\Program Files\PostgreSQL\16\data" --loca= le > "Turkish,T=C3=BCrkiye" -W XXX debug raw: getopt optarg =3D "Turkish,T=C3= =BCrkiye" XXX > debug hex: getopt optarg =3D { 54 75 72 6b 69 73 68 2c 54 fc 72 6b 69 79 = 65 } > XXX debug txt: getopt optarg =3D { T u r k i s h , T ? r k i y e } XXX de= bug > raw: getopt optarg =3D "Turkish,T=C3=BCrkiye" XXX debug hex: getopt optar= g =3D { 54 > 75 72 6b 69 73 68 2c 54 fc 72 6b 69 79 65 } XXX debug txt: getopt optarg = =3D > { T u r k i s h , T ? r k i y e } The files belonging to this database > system will be owned by user "Administrator". This user must also own the > server process. XXX debug raw: setlocales lc_ctype =3D "Turkish,T=C3=BCrk= iye" XXX > debug hex: setlocales lc_ctype =3D { 54 75 72 6b 69 73 68 2c 54 fc 72 6b = 69 > 79 65 } XXX debug txt: setlocales lc_ctype =3D { T u r k i s h , T ? r k = i y > e } XXX debug raw: setlocales cannonname =3D "Turkish_T=C3=BCrkiye.1254" = XXX debug > hex: setlocales cannonname =3D { 54 75 72 6b 69 73 68 5f 54 fc 72 6b 69 7= 9 65 > 2e 31 32 35 34 } XXX debug txt: setlocales cannonname =3D { T u r k i s h= _ T > ? r k i y e . 1 2 5 4 } XXX debug raw: setup_locale_encoding =3D > "Turkish_T=C3=BCrkiye.1254" XXX debug hex: setup_locale_encoding =3D { 54= 75 72 6b > 69 73 68 5f 54 fc 72 6b 69 79 65 2e 31 32 35 34 } XXX debug txt: > setup_locale_encoding =3D { T u r k i s h _ T ? r k i y e . 1 2 5 4 } The > database cluster will be initialized with locale "Turkish_T=C3=BCrkiye.12= 54". > The default text search configuration will be set to "turkish". Data page > checksums are disabled. Enter new superuser password: Enter it again: > fixing permissions on existing directory c:/Program > Files/PostgreSQL/16/data ... ok creating subdirectories ... ok selecting > dynamic shared memory implementation ... windows selecting default > max_connections ... 100 selecting default shared_buffers ... 128MB > selecting default time zone ... UTC creating configuration files ... ok > running bootstrap script ... ok performing post-bootstrap initialization > ... child process was terminated by exception 0xC0000409 initdb: removing > contents of data directory "c:/Program Files/PostgreSQL/16/data" > --=20 Sandeep Thakkar --0000000000001cdc5a061f0160d9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Aug 6, 2024 at 10:57=E2= =80=AFAM Thomas Munro <thomas.munro@gmail.com> wrote:
On Mon, Aug 5, 2024 at 8:50=E2=80=AFPM Sa= ndeep Thakkar
<s= andeep.thakkar@enterprisedb.com> wrote:
> This issue is seen only on v16 and not the back branches (tested on 15= and 14) and also confirmed by @Ertan K=C3=BC=C3=A7=C3=BCkoglu at https://github.com/Enterpr= iseDB/edb-installers/issues/127#issuecomment-2268371442

Does that mean you can reproduce the problem with initdb.exe directly
in a shell?=C2=A0 That is, remove the EDB installer from the picture and compare v15 and v16 with the exact command line options that
initcluster.vbs is using, or perhaps just:

initdb.exe --locale=3D"Turkish,T=C3=BCrkiye" --encoding=3DUTF-8 -= D pgdata

yes, here is the output:
c:\Program Files\PostgreSQL\16\bin>init= db.exe --encoding=3DUTF-8 -A scram-sha-256 -U postgres -D "c:\Program = Files\PostgreSQL\16\data" --locale "Turkish,T=C3=BCrkiye" -W=
The files belonging to this database system will be owned by user "= ;sandeep".
This user must also own the server process.

The d= atabase cluster will be initialized with locale "Turkish_T=C3=BCrkiye.= 1254".
The default text search configuration will be set to "t= urkish".

Data page checksums are disabled.

Enter new sup= eruser password:
Enter it again:

fixing permissions on existing d= irectory c:/Program Files/PostgreSQL/16/data ... ok
creating subdirector= ies ... ok
selecting dynamic shared memory implementation ... windowsselecting default max_connections ... 100
selecting default shared_buff= ers ... 128MB
selecting default time zone ... UTC
creating configurat= ion files ... ok
running bootstrap script ... ok
performing post-boot= strap initialization ... child process was terminated by exception 0xC00004= 09
initdb: removing contents of data directory "c:/Program Files/Po= stgreSQL/16/data"
=C2=A0
=C2=A0
. o O (Why does that locale name have a comma?)=C2=A0 If v15 works and v16<= br> breaks, perhaps you could try comparing the output with the attached
patch?=C2=A0 It will give a hex dump of the contents of the locale name at<= br> various points in the program, to see if/where it was corrupted, which
might also be a bit less confusing than looking at script output via
email (I don't even know how many onion layers of transcoding are
involved...)

here is the output:
v15:

c:\Program Files\PostgreSQL\15\bin>init= db.exe --encoding=3DUTF-8 -A scram-sha-256 -U postgres -D "c:\Program = Files\PostgreSQL\15\data" --locale "Turkish,T=C3=BCrkiye" -W=
XXX debug raw: getopt optarg =C2=A0=3D "Turkish,T=C3=BCrkiye"=
XXX debug hex: getopt optarg =C2=A0=3D { 54 75 72 6b 69 73 68 2c 54 fc = 72 6b 69 79 65 }
XXX debug txt: getopt optarg =C2=A0=3D { T =C2=A0u =C2= =A0r =C2=A0k =C2=A0i =C2=A0s =C2=A0h =C2=A0, =C2=A0T =C2=A0? =C2=A0r =C2=A0= k =C2=A0i =C2=A0y =C2=A0e =C2=A0}
XXX debug raw: getopt optarg =C2=A0=3D= "Turkish,T=C3=BCrkiye"
XXX debug hex: getopt optarg =C2=A0=3D= { 54 75 72 6b 69 73 68 2c 54 fc 72 6b 69 79 65 }
XXX debug txt: getopt = optarg =C2=A0=3D { T =C2=A0u =C2=A0r =C2=A0k =C2=A0i =C2=A0s =C2=A0h =C2=A0= , =C2=A0T =C2=A0? =C2=A0r =C2=A0k =C2=A0i =C2=A0y =C2=A0e =C2=A0}
The fi= les belonging to this database system will be owned by user "sandeep&q= uot;.
This user must also own the server process.

XXX debug raw: = setlocales lc_ctype =C2=A0=3D "Turkish,T=C3=BCrkiye"
XXX debug= hex: setlocales lc_ctype =C2=A0=3D { 54 75 72 6b 69 73 68 2c 54 fc 72 6b 6= 9 79 65 }
XXX debug txt: setlocales lc_ctype =C2=A0=3D { T =C2=A0u =C2= =A0r =C2=A0k =C2=A0i =C2=A0s =C2=A0h =C2=A0, =C2=A0T =C2=A0? =C2=A0r =C2=A0= k =C2=A0i =C2=A0y =C2=A0e =C2=A0}
XXX debug raw: setlocales cannonname = =C2=A0=3D "Turkish_T=C3=BCrkiye.1254"
XXX debug hex: setlocale= s cannonname =C2=A0=3D { 54 75 72 6b 69 73 68 5f 54 fc 72 6b 69 79 65 2e 31= 32 35 34 }
XXX debug txt: setlocales cannonname =C2=A0=3D { T =C2=A0u = =C2=A0r =C2=A0k =C2=A0i =C2=A0s =C2=A0h =C2=A0_ =C2=A0T =C2=A0? =C2=A0r =C2= =A0k =C2=A0i =C2=A0y =C2=A0e =C2=A0. =C2=A01 =C2=A02 =C2=A05 =C2=A04 =C2=A0= }
XXX debug raw: setup_locale_encoding =C2=A0=3D "Turkish_T=C3=BCrk= iye.1254"
XXX debug hex: setup_locale_encoding =C2=A0=3D { 54 75 72= 6b 69 73 68 5f 54 fc 72 6b 69 79 65 2e 31 32 35 34 }
XXX debug txt: set= up_locale_encoding =C2=A0=3D { T =C2=A0u =C2=A0r =C2=A0k =C2=A0i =C2=A0s = =C2=A0h =C2=A0_ =C2=A0T =C2=A0? =C2=A0r =C2=A0k =C2=A0i =C2=A0y =C2=A0e =C2= =A0. =C2=A01 =C2=A02 =C2=A05 =C2=A04 =C2=A0}
The database cluster will b= e initialized with locale "Turkish_T=C3=BCrkiye.1254".
The def= ault text search configuration will be set to "turkish".

D= ata page checksums are disabled.

Enter new superuser password:
En= ter it again:

fixing permissions on existing directory c:/Program Fi= les/PostgreSQL/15/data ... ok
creating subdirectories ... ok
selectin= g dynamic shared memory implementation ... windows
selecting default max= _connections ... 100
selecting default shared_buffers ... 128MB
selec= ting default time zone ... UTC
creating configuration files ... ok
ru= nning bootstrap script ... ok
performing post-bootstrap initialization .= .. ok
syncing data to disk ... ok

Success. You can now start the = database server using:

=C2=A0 =C2=A0 pg_ctl -D ^"c^:^\Program^ = Files^\PostgreSQL^\15^\data^" -l logfile start
=C2=A0

=C2= =A0v16:
C:\Program Files\PostgreSQL\16\bin>initdb.exe --enco= ding=3DUTF-8 -A scram-sha-256 -U postgres -D "c:\Program Files\Postgre= SQL\16\data" --locale "Turkish,T=C3=BCrkiye" -W XXX debug raw: getopt optarg =3D "Turkish,T=C3=BCrkiye" XXX debug hex: getopt optarg =3D { 54 75 72 6b 69 73 68 2c 54 fc 72 6b 69 = 79 65 } XXX debug txt: getopt optarg =3D { T u r k i s h , T ? r k i = y e } XXX debug raw: getopt optarg =3D "Turkish,T=C3=BCrkiye" XXX debug hex: getopt optarg =3D { 54 75 72 6b 69 73 68 2c 54 fc 72 6b 69 = 79 65 } XXX debug txt: getopt optarg =3D { T u r k i s h , T ? r k i = y e } The files belonging to this database system will be owned by user "Adm= inistrator". This user must also own the server process. XXX debug raw: setlocales lc_ctype =3D "Turkish,T=C3=BCrkiye" XXX debug hex: setlocales lc_ctype =3D { 54 75 72 6b 69 73 68 2c 54 fc 72 = 6b 69 79 65 } XXX debug txt: setlocales lc_ctype =3D { T u r k i s h , T ? r = k i y e } XXX debug raw: setlocales cannonname =3D "Turkish_T=C3=BCrkiye.1254&q= uot; XXX debug hex: setlocales cannonname =3D { 54 75 72 6b 69 73 68 5f 54 fc 7= 2 6b 69 79 65 2e 31 32 35 34 } XXX debug txt: setlocales cannonname =3D { T u r k i s h _ T ? r= k i y e . 1 2 5 4 } XXX debug raw: setup_locale_encoding =3D "Turkish_T=C3=BCrkiye.1254&q= uot; XXX debug hex: setup_locale_encoding =3D { 54 75 72 6b 69 73 68 5f 54 fc 7= 2 6b 69 79 65 2e 31 32 35 34 } XXX debug txt: setup_locale_encoding =3D { T u r k i s h _ T ? r= k i y e . 1 2 5 4 } The database cluster will be initialized with locale "Turkish_T=C3=BCr= kiye.1254". The default text search configuration will be set to "turkish". Data page checksums are disabled. Enter new superuser password: Enter it again: fixing permissions on existing directory c:/Program Files/PostgreSQL/16/dat= a ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... windows selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... UTC creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... child process was terminated b= y exception 0xC0000409 initdb: removing contents of data directory "c:/Program Files/PostgreS= QL/16/data"

=
--
=
Sandeep Thakkar

--0000000000001cdc5a061f0160d9--