Re: 9.5: Can't connect with PGSSLMODE=require on Windows

Поиск
Список
Период
Сортировка
От Asif Naeem
Тема Re: 9.5: Can't connect with PGSSLMODE=require on Windows
Дата
Msg-id CAEB4t-PMbn=B5HsfQybAH=wXwxNHY=MkJ6fX4PuMQpBvuVfwTg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: 9.5: Can't connect with PGSSLMODE=require on Windows  (Thom Brown <thom@linux.com>)
Ответы Re: 9.5: Can't connect with PGSSLMODE=require on Windows  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: 9.5: Can't connect with PGSSLMODE=require on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I have spent sometime to investigate the issue, it is reproduciable. In case of Windows, when pqsecure_raw_read() function error code WSAEWOULDBLOCK (EWOULDBLOCK) when no data queued to be read from the non blocking socket there is a need to log retry flag. Related error code can be retrieved via Windows WSAGetLastError() instead of errno, preprocessor SOCK_ERRNO handle it gracefully. PFA patch, it resolve the issue i.e.

C:\PG\postgresql\pg_with_openssl_inst_v1_patch>bin\psql.exe -d postgres -h  172.16.141.210
psql (9.5alpha2)
WARNING: Console code page (437) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
postgres=# select version();
                             version
-----------------------------------------------------------------
 PostgreSQL 9.5alpha2, compiled by Visual C++ build 1800, 64-bit
(1 row)

Regards,
Muhammad Asif Naeem


On Thu, Sep 24, 2015 at 5:12 PM, Thom Brown <thom@linux.com> wrote:
On 23 September 2015 at 13:10, Michael Paquier
<michael.paquier@gmail.com> wrote:
>
>
> On Wed, Sep 23, 2015 at 2:15 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>>
>> On Tue, Sep 22, 2015 at 11:23 AM, Andrew Dunstan <andrew@dunslane.net>
>> wrote:
>> > "git bisect" is your friend.
>>
>> Yeah, but finding someone who has a working Windows build environment
>> and a lot of time to run this down is my enemy.  We're trying, but if
>> anyone else has a clue, that would be much appreciated.
>
>
> That's not cool. I have added this problem in the list of open items for
> 9.5.

This appears that it might be related to the version of OpenSSL that's
been packaged with PostgreSQL 9.5 alpha 2.  When swapping this out for
the version that's shipped with 9.4, it works.  I don't have the
specific OpenSSL versions to hand, but I'll report back anything as I
learn more.

--
Thom


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: row_security GUC, BYPASSRLS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Rename withCheckOptions to insertedCheckClauses