X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 249D452D92 for ; Thu, 14 Jul 2005 13:16:57 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27241-09 for ; Thu, 14 Jul 2005 16:16:51 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id 5FC3152D82 for ; Thu, 14 Jul 2005 13:16:51 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j6EGGoB18114; Thu, 14 Jul 2005 12:16:50 -0400 (EDT) From: Bruce Momjian Message-Id: <200507141616.j6EGGoB18114@candle.pha.pa.us> Subject: Re: Libpq driver: thread problem In-Reply-To: To: Dave Page Date: Thu, 14 Jul 2005 12:16:50 -0400 (EDT) Cc: pgsql-odbc@postgresql.org, Anoop Kumar , Magnus Hagander X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/60 X-Sequence-Number: 5526 Dave Page wrote: > > The main issue with the flag, as I remember, is to allow multiple > > threads to open libpq connections. If you don't do that, you > > don't need > > the flag. > > In which case it definitely needs fixing. Which may be a non-trivial > task as pthreads on Windows is not currently used by PostgreSQL, and > didn't want to play last time I looked at it :-( However... > > I did look at this very briefly before speaking to Magnus. The first > problem I ran into was that configure was insisting that posix signals > were needed to enable thread safety. Before I spend lots of time looking > at the code do you know if it is safe for me to assume our signal > emaulation will do that job in all the right places? If so, I guess it's > just a case of fixing the pthread detection and linker flags. Ewe. I bet we added that test program _after_ we got threads working on Win32. That program, and the flags detection configure checks have made threads configuration almost fool-proof, so I don't think we should change any of that. As far as the Win32 API, I am unsure. Let me see if I can hack up thread_test.c to use libpq/pthread-win32.c to see if I can get that working. -- 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