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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 9.5: Can't connect with PGSSLMODE=require on Windows
Дата
Msg-id 29800.1443475728@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 9.5: Can't connect with PGSSLMODE=require on Windows  (Andres Freund <andres@anarazel.de>)
Ответы Re: 9.5: Can't connect with PGSSLMODE=require on Windows  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2015-09-28 16:57:24 -0400, Tom Lane wrote:
>> Great detective work!  But if that's broken, then surely the identical
>> code in my_sock_write is as well; and the reassignment to errno at the
>> bottom of my_sock_read needs to be SOCK_ERRNO_SET(); and why doesn't
>> my_sock_write have a reassignment at all?

> I wonder if we couldn't remove saving/restoring errno entirely from
> my_sock_*. We didn't do so before 680513ab79 and I can't see a reason
> why we'd need to now.

Agreed, see my comment to the same effect.

> What I do find curious is that afaics before 680513ab79 the code also
> looked at errno, not SOCK_ERRNO. And apparently things worked back then?

No; AFAICS, before that commit, libpq did not use a custom BIO at all.
That commit cloned the backend's custom BIO, but did not correctly
adjust the backend's errno handling for the libpq environment.

Will go fix it.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 9.5: Can't connect with PGSSLMODE=require on Windows
Следующее
От: Andres Freund
Дата:
Сообщение: Re: 9.5: Can't connect with PGSSLMODE=require on Windows