Re: libpq WSACleanup is not needed

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: libpq WSACleanup is not needed
Дата
Msg-id
200901201541.n0KFf1329272@momjian.us
Ответ на
Список
Дерево обсуждения
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:
> Bruce Momjian wrote:
> > Andrew Chernow wrote:
> >> Bruce Momjian wrote:
> >>> We could have gone with a more elegant init/uninit solution but there is
> >>> a history of slow upstream adoption of libpq API changes.
> >>>
> >>>
> >> If that's the case, adding a connectdb option seems like a good 
> >> alternative.  Orignally suggested here:
> >>
> >> http://archives.postgresql.org/pgsql-hackers/2009-01/msg01358.php
> > 
> > Right, well the big question is how many people are going to use the
> > connection option vs. doing it for everyone automatically.
> > 
> > One possible approach might be to do it automatically, and allow a
> > connection option to disable the WSACleanup() call.
> 
> I think that was the suggestion. Have an option that would disable
> *both* the startup and the cleanup call, leaving the responsibility to
> the app.
> 
> You can do this for SSL today by calling PQinitSSL().

Right.

> > Actually, right now, if you have two libpq connections, and close one,
> > does WSACleanup() get called, and does it affect the existing
> > connection?
> 
> WSACleanup() gets called, but it has an internal reference count so it
> does not have any effect on existing connections.

Ah, OK, so it does its own cleanup on last close, great. I agree a
connection option for this would be good.

--  Bruce Momjian          http://momjian.us EnterpriseDB                             http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +

В списке pgsql-hackers по дате отправления
От: Stephen Frost
Дата:
От: Bruce Momjian
Дата:
FAQ