Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 1BD6F9FA348 for ; Thu, 25 Oct 2007 18:23:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 06843-03 for ; Thu, 25 Oct 2007 18:23:07 -0300 (ADT) X-Greylist: delayed 00:07:20.446806 by SQLgrey-1.7.5 Received: from web37301.mail.mud.yahoo.com (web37301.mail.mud.yahoo.com [209.191.90.244]) by postgresql.org (Postfix) with SMTP id D5FC89F9B9F for ; Thu, 25 Oct 2007 18:23:07 -0300 (ADT) Received: (qmail 40229 invoked by uid 60001); 25 Oct 2007 21:15:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=QDTqOdb4BvKPuxD9fYoOX3xf8M+TkdlQlLNCoeQmhowcj8U9l2KhxfbuaeycPJslC3zxcac3cg9Dh0DeN9DL5x1U04UB69xmT1M1jtP1RZD/9h/Br5Dj1jW0PQX+5sGDbRktWpThgFPFaZZZLtrMRioIzNAKtCOpQw0jwejInw0=; X-YMail-OSG: F1sRLJkVM1l0vVRUASu11cE0qHQcv8loym92w9zO Received: from [66.226.193.82] by web37301.mail.mud.yahoo.com via HTTP; Thu, 25 Oct 2007 14:15:45 PDT Date: Thu, 25 Oct 2007 14:15:45 -0700 (PDT) From: andrew klassen Subject: is libpq thread safe without configure enable_thread_safety=yes To: pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-985140857-1193346945=:39043" Content-Transfer-Encoding: 8bit Message-ID: <731502.39043.qm@web37301.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/11 X-Sequence-Number: 6638 --0-985140857-1193346945=:39043 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I want to use the libpq in a multithreaded process. I intend to use two different connections for two different threads. The requests and results for each connection will be handled completely by each thread independently. I tried to set enable_thread_safety and enable_thread_safety_force to yes. However, the compile fails because of references to pthread routines which are not supported by my os. Specifically: ../../../src/interfaces/libpq/libpq.so: undefined reference to `pthread_sigmask' ../../../src/interfaces/libpq/libpq.so: undefined reference to `pthread_mutex_unlock' ../../../src/interfaces/libpq/libpq.so: undefined reference to `pthread_mutex_lock' ../../../src/interfaces/libpq/libpq.so: undefined reference to `sigwait' I can change the code to fix this, but I wondering if based on my application it is okay to just configure without setting enable_thread_safety. Thanks for any help. Andrew __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --0-985140857-1193346945=:39043 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
I want to use the libpq in a multithreaded process. I intend to use two
different connections for two different threads. The requests and results
for each connection will be handled completely by each thread independently.
I tried to set enable_thread_safety and enable_thread_safety_force to yes.
However, the compile fails because of references to pthread routines which are not
supported by my os. Specifically:
 
../../../src/interfaces/libpq/libpq.so: undefined reference to `pthread_sigmask'
../../../src/interfaces/libpq/libpq.so: undefined reference to `pthread_mutex_unlock'
../../../src/interfaces/libpq/libpq.so: undefined reference to `pthread_mutex_lock'
../../../src/interfaces/libpq/libpq.so: undefined reference to `sigwait'
 
I can change the code to fix this, but I wondering if based on my application it is okay
to just configure without setting enable_thread_safety.
 
Thanks for any help.
Andrew
 

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com --0-985140857-1193346945=:39043--