Re: Improving connection scalability: GetSnapshotData()

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Improving connection scalability: GetSnapshotData()
Дата
Msg-id b78190bf-b401-da4b-cf07-107327de7d58@2ndQuadrant.com
обсуждение исходный текст
Ответ на Re: Improving connection scalability: GetSnapshotData()  (Andres Freund <andres@anarazel.de>)
Ответы Re: Improving connection scalability: GetSnapshotData()  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 10/1/20 4:22 PM, Andres Freund wrote:
> Hi,
>
> On 2020-10-01 16:00:20 -0400, Andrew Dunstan wrote:
>> My strong suspicion is that we're getting unwanted CRs. Note the
>> presence of numerous instances of this in PostgresNode.pm:
>
>>     $stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
>>
>> So you probably want something along those lines at the top of the loop
>> in send_query_and_wait:
>>
>>     $$psql{stdout} =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
> Yikes, that's ugly :(.
>
>
> I assume it's not, as the comments says
>     # Note: on Windows, IPC::Run seems to convert \r\n to \n in program output
>     # if we're using native Perl, but not if we're using MSys Perl.  So do it
>     # by hand in the latter case, here and elsewhere.
> that IPC::Run converts things, but that native windows perl uses
> https://perldoc.perl.org/perlrun#PERLIO
> a PERLIO that includes :crlf, whereas msys probably doesn't?
>
> Any chance you could run something like
> perl -mPerlIO -e 'print(PerlIO::get_layers(STDIN), "\n");'
> on both native and msys perl?
>
>

sys (jacana): stdio

native: unixcrlf


cheers


andrew


-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Improving connection scalability: GetSnapshotData()
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Improving connection scalability: GetSnapshotData()