Re: libpq WSACleanup is not needed

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: James Mansion <james(at)mansionfamily(dot)plus(dot)com>
Cc: Andrew Chernow <ac(at)esilo(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq WSACleanup is not needed
Date: 2009-01-19 09:23:12
Message-ID: 49744680.4040507@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

James Mansion wrote:
> Andrew Chernow wrote:
>> m$ docs indicate that wsastartup can't be called from dllmain :(
>>
> OK, fair cop. Says it in the MSDN online version but not in the SDK 6.1
> version. :-( Some helper(s)
> must start threads I guess.

That, and it loads other DLLs as well.

> Re the counting and doing it on first/last socket - of course WSAStartup
> counts internally. Prsumably
> its only slow when the count is actually going to zero?

Yes.

> Is there a need for a new API to control this - can't you just interpret
> another parameter keyword
> in PQconnectdb (or the pgoptions string in PQsetdbLogin I guess)?
> (Having said that, how
> do you control send and receive buffer sizes? Presumably nagle is
> always disabled, but those
> features could be controlled the same way? Would presumably allow
> PGOPTIONS to be
> parsed too, though docs 30.12 says that does runtime options for the
> server, though
> PQconnectdb in 30.1 suggests that it might be parsed for the client
> connect too. Maybe.).

You can always get the socket descriptor back and modify it directly, if
you are sure that what you're changing is supported..

//Magnus

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-01-19 09:39:07 Re: WIP: Automatic view update rules
Previous Message Bernd Helmle 2009-01-19 08:18:09 Re: WIP: Automatic view update rules