From: | Manika Singhal <manika(dot)singhal(at)enterprisedb(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(dot)dunstan(at)enterprisedb(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
Subject: | initdb.exe Fails on Windows When Password File Path Contains Non-ASCII Characters |
Date: | 2025-03-11 11:42:09 |
Message-ID: | CAB1XC2Lw8_zTa=v2Rxu=hRik1vbTgk0yfC-PT1eODWjHuhgbMg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
The postgresql windows installer packaged by EDB, creates the postgresql
instance on the fly.
It creates a temporary file to store the password and then deletes it once
the initdb is run successfully.
But a user reported the initdb fails. On debugging it was found that, it
occurs because the username in the
%TEMP% contains the non-ascii characters as shown in the example below
*initdb.exe --pgdata="C:\Program Files\PostgreSQL\17\data"
--username=postgres --encoding=UTF8
--pwfile="C:\Users\玛妮卡\AppData\Local\Temp\passwdXXX"
--auth=scram-sha-256* *initdb:
error: could not open file "C:\Users\???\AppData\Local\Temp\psswrdXXXX" for
reading: No such file or directory* ... .... It seems that initdb.exe does
not correctly handle paths containing Unicode characters, replacing them
with ???
in the error message. I want to ask if this is the expected behaviour of
initdb.exe? When the user temp location is replaced with system temp
(c:\windows\temp) the error goes away.
Any suggestions if the installer should use this path to create the
password file?
-----------------------------
Thanks & Regards
Manika Singhal
EDB India
From | Date | Subject | |
---|---|---|---|
Next Message | Manika Singhal | 2025-03-11 11:48:04 | Re: initdb.exe Fails on Windows When Password File Path Contains Non-ASCII Characters |
Previous Message | Jim Jones | 2025-03-11 11:32:09 | Re: Reducing the log spam |