Re: libpq is not thread safe
| От | Tom Lane | 
|---|---|
| Тема | Re: libpq is not thread safe | 
| Дата | |
| Msg-id | 1674.1241383184@sss.pgh.pa.us обсуждение исходный текст  | 
		
| Ответ на | libpq is not thread safe (Zdenek Kotala <Zdenek.Kotala@Sun.COM>) | 
| Ответы | 
                	
            		Re: libpq is not thread safe
            		
            		 | 
		
| Список | pgsql-hackers | 
Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:
> When postgreSQL is compiled with --thread-safe that libpq should be
> thread safe. But it is not true when somebody call fork(). The problem
> is that fork() forks only active threads and some mutex can stay locked
> by another thread. We use ssl_config mutex which is global.
fork() without exec() when there are open libpq connections is
unbelievably dangerous anyway --- you will have multiple processes
that all think they own the same database connection.  I think writing
code to deal with this for the ssl_config mutex is entirely a waste
of time.
        regards, tom lane
		
	В списке pgsql-hackers по дате отправления: