Re: [HACKERS] libpq is not thread safe

2009-05-29 Thread Bruce Momjian
Zdenek Kotala wrote: > > Bruce Momjian p??e v ?t 28. 05. 2009 v 17:20 -0400: > > > > > > > Done, patch attached and applied. > > > > I went with a because it seemed most appropriate, but it looks > > very large: > > > > http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html >

Re: [HACKERS] libpq is not thread safe

2009-05-29 Thread Zdenek Kotala
Bruce Momjian píše v čt 28. 05. 2009 v 17:20 -0400: > > > > Done, patch attached and applied. > > I went with a because it seemed most appropriate, but it looks > very large: > > http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html > > Should it be a notice? I prefer war

Re: [HACKERS] libpq is not thread safe

2009-05-28 Thread Bruce Momjian
Bruce Momjian wrote: > > Another advantage of atfork handler is that you can close all open > > connection and clean resource (similar to what pkcs11 library does). But > > at this moment libpq does not keep list of open connections and atfork > > handler works only with pthreads. > > > > > I thin

Re: [HACKERS] libpq is not thread safe

2009-05-28 Thread Bruce Momjian
Zdenek Kotala wrote: > > Tom Lane p??e v ne 03. 05. 2009 v 16:39 -0400: > > Zdenek Kotala 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 a

Re: [HACKERS] libpq is not thread safe

2009-05-04 Thread Zdenek Kotala
Tom Lane píše v ne 03. 05. 2009 v 16:39 -0400: > Zdenek Kotala 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 > >

Re: [HACKERS] libpq is not thread safe

2009-05-03 Thread Tom Lane
Zdenek Kotala 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 globa

Re: [HACKERS] libpq is not thread safe

2009-04-15 Thread Bruce Momjian
Zdenek Kotala wrote: > 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.