Re: ecpg thread-safe descriptor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org
Subject: Re: ecpg thread-safe descriptor
Date: 2007-10-02 18:37:40
Message-ID: 24219.1191350260@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

I wrote:
> Michael Meskes <meskes(at)postgresql(dot)org> writes:
>> Since I do not know whether we really need DllMain could anyone please
>> test whether ecpg builds correctly without it?

> It looks to me like we should not need it, if we instead add code to
> initialize the mutexes properly on Windows (a la the way it's done
> in libpq).

Hm, I take that back --- the other reason it's there is as a kluge to
avoid supporting pthread_once(). This code all looks pretty darn hokey,
not to mention that it ought to be merged with libpq's pthread-win32.c,
but fixing it seems not a one-hour proposition.

>> AFAIRC (and hopefully I'm right this time)
>> multithreading never worked under msvc so we might have to set
>> thread-safety to disabled on these systems for ecpg for the time being.

If it didn't work then this seems clearly new-feature-development.

I think Magnus' idea of providing an exports list would be worth trying,
if someone can try it promptly; failing that, we need to revert this
patch.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2007-10-02 19:01:47 Re: Loose check was corrected of win32.mak.
Previous Message Magnus Hagander 2007-10-02 18:23:21 Re: ecpg thread-safe descriptor