Re: libpq WSACleanup is not needed

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: libpq WSACleanup is not needed
Дата
Msg-id
20090116141710.GC9963@alvh.no-ip.org
Ответ на
Список
Дерево обсуждения
libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Magnus Hagander <magnus@hagander.net>
Re: libpq WSACleanup is not needed Alvaro Herrera <alvherre@commandprompt.com>
Re: libpq WSACleanup is not needed Magnus Hagander <magnus@hagander.net>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Tom Lane <tgl@sss.pgh.pa.us>
Re: libpq WSACleanup is not needed Magnus Hagander <magnus@hagander.net>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Magnus Hagander <magnus@hagander.net>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed James Mansion <james@mansionfamily.plus.com>
Re: libpq WSACleanup is not needed Bruce Momjian <bruce@momjian.us>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Bruce Momjian <bruce@momjian.us>
Re: libpq WSACleanup is not needed Magnus Hagander <magnus@hagander.net>
Re: libpq WSACleanup is not needed Bruce Momjian <bruce@momjian.us>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Bruce Momjian <bruce@momjian.us>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Bruce Momjian <bruce@momjian.us>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Bruce Momjian <bruce@momjian.us>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Andrew Dunstan <andrew@dunslane.net>
Re: libpq WSACleanup is not needed Bruce Momjian <bruce@momjian.us>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed James Mansion <james@mansionfamily.plus.com>
Re: libpq WSACleanup is not needed Magnus Hagander <magnus@hagander.net>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Magnus Hagander <magnus@hagander.net>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Tom Lane <tgl@sss.pgh.pa.us>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed "Merlin Moncure" <mmoncure@gmail.com>
Re: libpq WSACleanup is not needed Jeroen Vermeulen <jtv@xs4all.nl>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed James Mansion <james@mansionfamily.plus.com>
Re: libpq WSACleanup is not needed Magnus Hagander <magnus@hagander.net>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Magnus Hagander <magnus@hagander.net>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Tom Lane <tgl@sss.pgh.pa.us>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Bruce Momjian <bruce@momjian.us>
Re: libpq WSACleanup is not needed Andrew Chernow <ac@esilo.com>
Re: libpq WSACleanup is not needed Bruce Momjian <bruce@momjian.us>
Magnus Hagander wrote:
> Andrew Chernow wrote:
> > WSACleanup is not really needed during a PQfinish.  Its horribly slow if
> >  the library ref count is 0 and it actually unloads the winsock library,
> > adds 225ms to PQfinish.
> > 
> > Solution:
> > A) Call WSAStartup once and never clean it up.  When the app dies, so do
> > the ref counts and winsock is automatically unloaded.

> If you want to override this behavior today, you can just call
> WSAStartup() in your application, and it should never happen. Right?

Or perhaps use _init() and _fini() or the Win32 equivalents?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

В списке pgsql-hackers по дате отправления
От: Andrew Chernow
Дата:
От: Heikki Linnakangas
Дата:
FAQ