Re: WSAStartup() in libpq

Поиск
Список
Период
Сортировка
От Andreas Pflug
Тема Re: WSAStartup() in libpq
Дата
Msg-id 45EFF7DE.1000407@pse-consulting.de
обсуждение исходный текст
Ответ на WSAStartup() in libpq  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: WSAStartup() in libpq  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Magnus Hagander wrote:
>
> The easy fix for this is to remove the calls. Which obviously will break
> some client apps. A fairly easy fix for the WSAStartup() call is to have
> a check in the connection functions against a global variable that will
> then make sure to call WSAStartup() the first time it's called.
>
> That would leave us "leaking" the WSAStartup() call, but only one per
> application. This is not perfect, but I'm thinking we can maybe live
> with that. 
>
> If not, perhaps we can have it call WSAStartup() everytime we connect to
> a server, and then WSACleanup() when we shut down that connection with
> PQfinish(). 

Taken from MSDN docs, this seems the recommended solution. After the
first WSAStartup call subsequent calls are cheap because they only
increment a counter.

Regards,
Andreas



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

Предыдущее
От: "Zeugswetter Andreas ADI SD"
Дата:
Сообщение: Re: Auto creation of Partitions
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: WSAStartup() in libpq