Home > Archive > PostgreSQL Bugs > May 2005 > Re: BUG #1545: LIBPQ Windows Version not calling WSACleanup for









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: BUG #1545: LIBPQ Windows Version not calling WSACleanup for
Magnus Hagander

2005-05-05, 11:24 am

>>> The only place WSACleanup is being called is libpqdll when
>the process
>which matches up
>not have a
>in freePGconn(),
>function.
>interface for
>
>
>Actually ... why do we need a WSAStartup in makeEmptyPGconn?
>If we have
>one in DLL attach, isn't that sufficient?


Not if you link libpq as a static lib...

I *think* that's why it was added. In the beginning it was only in the
DLL attach code, and if you were using the library as a static lib you
had to call it yourself. Not sure when that changed, but clearly that is
when the WSACleanup() call should've gone in.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Tom Lane

2005-05-05, 11:24 am

"Magnus Hagander" <mha@sollentuna.net> writes:
[color=darkred]
> Not if you link libpq as a static lib...


> I *think* that's why it was added. In the beginning it was only in the
> DLL attach code, and if you were using the library as a static lib you
> had to call it yourself. Not sure when that changed, but clearly that is
> when the WSACleanup() call should've gone in.


Ah. Makes sense. So adding it to freePGconn is correct.

Bruce, you should probably back-patch for as far as the WSAStartup call
is there, which looks to be 7.4.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Bruce Momjian

2005-05-05, 11:24 am

Magnus Hagander wrote:
>
> Not if you link libpq as a static lib...
>
> I *think* that's why it was added. In the beginning it was only in the
> DLL attach code, and if you were using the library as a static lib you
> had to call it yourself. Not sure when that changed, but clearly that is
> when the WSACleanup() call should've gone in.
>


OK, good. I will document that and have the fix in 8.0.4.

--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Bruce Momjian

2005-05-05, 11:24 am

Tom Lane wrote:
> "Magnus Hagander" <mha@sollentuna.net> writes:
>
>
>
> Ah. Makes sense. So adding it to freePGconn is correct.
>
> Bruce, you should probably back-patch for as far as the WSAStartup call
> is there, which looks to be 7.4.


OK, going ahead. I am not thrilled to be fixing this so close to the
release for untestable code.

--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com