Re: [PATCHES] ecpg thread-safe descriptor

2007-10-03 Thread Michael Meskes
On Tue, Oct 02, 2007 at 04:07:06PM -0400, Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: Michael Meskes wrote: So, does an explicit export list help? If so I'm all for it. There is no need to export all symbols. I always tried to keep the number of symbols that get exported but

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Magnus Hagander
On Tue, Oct 02, 2007 at 02:38:09PM +0900, ITAGAKI Takahiro wrote: Here is a patch to fix thread-safety of SQL DESCRIPTOR in ecpg. The global variable 'all_descriptors' is split into per-thread vars. There was another idea of splitting into per-connection vars, but I did not do that because

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread ITAGAKI Takahiro
Magnus Hagander [EMAIL PROTECTED] wrote: Are you sure we should backport this to 8.2 and earlier? It's fairly large changes, and not necessarily entirely straightforward (for example, the buildfarm is still partially broken from the earlier ones not being portable enough). Almost

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Michael Meskes
On Tue, Oct 02, 2007 at 02:38:09PM +0900, ITAGAKI Takahiro wrote: Here is a patch to fix thread-safety of SQL DESCRIPTOR in ecpg. ... Applied to CVS HEAD. Thanks. Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) ICQ: 179140304, AIM/Yahoo:

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Magnus Hagander
On Tue, Oct 02, 2007 at 12:23:10PM +0200, Michael Meskes wrote: On Tue, Oct 02, 2007 at 06:45:12PM +0900, ITAGAKI Takahiro wrote: Almost portability issues come from Windows, but ecpg in 8.2 only support thread-safety on pthread, not on Win32. So backporting is easier than expected because

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: I think this can be considered a new feature and not just a plain bugfix, so it should probably only go into HEAD. I am very nearly ready to demand that ecpg as a whole be reverted to its state as of Saturday, with all the patches since then held for

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Michael Meskes
On Tue, Oct 02, 2007 at 10:39:40AM -0400, Tom Lane wrote: I am very nearly ready to demand that ecpg as a whole be reverted to its state as of Saturday, with all the patches since then held for 8.4 development. At no point since Sunday morning has ecpg been passing If we say ecpg is not

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Andrew Dunstan
Michael Meskes wrote: It it appears to me that the MSVC build problem has existed for weeks or months but no one noticed so far, right? This is absolutely not true. We have been building ecpg successfully on MSVC all along, just not testing. See for example the make log at

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Michael Meskes
On Tue, Oct 02, 2007 at 12:53:58PM -0400, Andrew Dunstan wrote: It it appears to me that the MSVC build problem has existed for weeks or months but no one noticed so far, right? This is absolutely not true. We have been building ecpg successfully on MSVC all along, just not testing. See

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Tom Lane
Michael Meskes [EMAIL PROTECTED] writes: Sorry, my bad. Seems I got this mixed up. Once we enabled testing for ecpg we had some problems to be sorted out, but right now only the DllMain thing seems to be a problem. Since I do not know whether we really need DllMain could anyone please test

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Magnus Hagander
Michael Meskes wrote: On Tue, Oct 02, 2007 at 12:53:58PM -0400, Andrew Dunstan wrote: It it appears to me that the MSVC build problem has existed for weeks or months but no one noticed so far, right? This is absolutely not true. We have been building ecpg successfully on MSVC all along,

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Magnus Hagander
Tom Lane wrote: Michael Meskes [EMAIL PROTECTED] writes: Sorry, my bad. Seems I got this mixed up. Once we enabled testing for ecpg we had some problems to be sorted out, but right now only the DllMain thing seems to be a problem. Since I do not know whether we really need DllMain could

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Tom Lane
I wrote: Michael Meskes [EMAIL PROTECTED] 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

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Michael Meskes
On Tue, Oct 02, 2007 at 08:23:21PM +0200, Magnus Hagander wrote: test that a build passes, but remember that we can't really run the regression tests on msvc right now :-( But then we definitely need to fix this, regardless of the DllMain thing. Michael -- Michael Meskes Email: Michael at

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Magnus Hagander
Michael Meskes wrote: On Tue, Oct 02, 2007 at 08:23:21PM +0200, Magnus Hagander wrote: test that a build passes, but remember that we can't really run the regression tests on msvc right now :-( But then we definitely need to fix this, regardless of the DllMain thing. Absolutely, but we need

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Michael Meskes
On Tue, Oct 02, 2007 at 02:37:40PM -0400, Tom Lane wrote: 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

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Michael Meskes
On Tue, Oct 02, 2007 at 08:22:21PM +0200, Magnus Hagander wrote: There are two problems: 1) DllMain breaks the build *completely*. This is the really urgent one. This one broke 2 days ago or so. 2) Regression tests don't pass on MSVC anymore. This broke a while ago. I was working on fixing

Re: [PATCHES] ecpg thread-safe descriptor

2007-10-02 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Michael Meskes wrote: So, does an explicit export list help? If so I'm all for it. There is no need to export all symbols. I always tried to keep the number of symbols that get exported but are not needed low. So this will give the best result