Re: BUG #18098: Console code page issue Postgresql 14.7

Поиск
Список
Период
Сортировка
От Gokul Krishnan
Тема Re: BUG #18098: Console code page issue Postgresql 14.7
Дата
Msg-id CAL75wyn38ck3-ijMvTD_=-3A9GvYdS1JNBs6gShuNDWe=q8m5Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18098: Console code page issue Postgresql 14.7  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: BUG #18098: Console code page issue Postgresql 14.7  (Gokul Krishnan <gokulkrishnan99102@gmail.com>)
Список pgsql-bugs
Hi Laurenz,
        Apologies for the inconvenience,I have shared the detailed description below. Kindly provide a solution for this issue.
I have tried to initialize data directory using this below command,
initdb.exe -D "..\data" -U postgres --no-locale -E UTF8

Exact error returned by postgres,
initdb: error: The program "postgres" was found by "E:\pgsql\bin/initdb.exe"
but was not the same version as initdb.
Check your installation.
image.png


I have tried with different chcp values(1252,437.. etc) that are supported by postgres but doesn't work for my case(encoding command also changed according to registry chcp value) .If I remove the Active code page : 65001 from the registry editor, then the above mentioned initdb command executes successfully.

Successful execution log for your reference,

Microsoft Windows [Version 10.0.19045.3324]
(c) Microsoft Corporation. All rights reserved.

E:\pgsql\bin>initdb.exe -D "..\data" -U postgres --no-locale -E UTF8
The files belonging to this database system will be owned by user "gokul".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory ../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 ... Asia/Calcutta
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    pg_ctl -D ^"^.^.^\data^" -l logfile start


image.png

 Registry Editor key I have removed,
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\Autorun  -> Removed the Value data(chcp 65001) content.

image.png

My Current System locale is English (United States)

image.png

Thanks & Regards,
 Gokul


On Fri, Sep 8, 2023 at 12:17 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Fri, 2023-09-08 at 12:02 +0530, Gokul Krishnan wrote:
> Kindly provide the solution accordingly.

Kindly provide a good problem description.  Don't say "I run initdb.exe",
tell us how exactly you ran it, and what you ran before that to provoke the error.
What was your OS locale at that time? What was the exact error message?
What exactly did you have to change in the registry to make the problem go away?

Yours,
Laurenz Albe
Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: BUG #18077: PostgreSQL server subprocess crashed by a SELECT statement with WITH clause
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18094: max max_connections cannot be set