Skip site navigation (1) Skip section navigation (2)

is libpq thread safe without configure enable_thread_safety=yes

From: andrew klassen <aptklassen(at)yahoo(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: is libpq thread safe without configure enable_thread_safety=yes
Date: 2007-10-25 21:15:45
Message-ID: 731502.39043.qm@web37301.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
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 

Responses

pgsql-interfaces by date

Next:From: Alvaro HerreraDate: 2007-10-25 22:03:22
Subject: Re: is libpq thread safe without configureenable_thread_safety=yes
Previous:From: pawan shirbhateDate: 2007-10-25 10:47:26
Subject: Error : could not send data to server: Error 0

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group