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

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: gokulkrishnan99102(at)gmail(dot)com
Cc: laurenz(dot)albe(at)cybertec(dot)at, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18098: Console code page issue Postgresql 14.7
Date: 2023-09-13 03:02:21
Message-ID: 20230913.120221.764828187369590200.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

At Tue, 12 Sep 2023 14:36:03 +0530, Gokul Krishnan <gokulkrishnan99102(at)gmail(dot)com> wrote in
> Hi Laurenz,
> I have shared all the required details in previous mail, Kindly provide a
> solution for this issue.

Thanks for the info. It suspect that the issue arises because chcp
prints "Active code page: 65001", which can clutter things up in
various situations. AFAICS there's no option to silence it. It's
puzzling why Microsoft would suggest such a problematic setup (if it
really does).

When initdb probes for the postgres version, it uses _popen. From what
I gather, it uses cmd.exe. This action then may automatically runs
chcp, injecting the line "Active code page: 65001" to the output. You
can observe this with the following command line. initdb expects the
secondline to come first.

> work>cmd /c pgsql\bin\postgres -V
> Active code page: 65001
> postgres (PostgreSQL) 17devel

For the record, I couldn't reproduced this issue on Windows 11, so I
didn't observed what actually happens in this situation. Not entirely
sure why, but maybe _popen in that version either bypasses cmd.exe or
prevents it from executing autoruns. But, I face hiccups with
VsDevCmd.bat when pulling output from subshells.

As the result, I'd advise against doing that, especially on the server
running PostgreSQL.

I don't think we want to "fix" this issue, especially if Windows 11
has already adressed it. But I'm not sure about this.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2023-09-13 03:11:13 Re: FW: query pg_stat_ssl hang 100%cpu
Previous Message Ринат Мухтаров 2023-09-12 21:25:57 PostgreSQL 12.15 query performance problem