Re: libpq is not thread safe

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq is not thread safe
Date: 2009-05-28 21:20:52
Message-ID: 200905282120.n4SLKr018592@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 think writing code to deal with this for the ssl_config mutex is entirely a waste
> > > of time.
> >
> > yeah, I prefer to document it together how to deal with fork() and
> > sessions.
>
> Done, patch attached and applied.

I went with a <warning> because it seemed most appropriate, but it looks
very large:

http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html

Should it be a notice?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2009-05-28 21:21:58 Re: search_path vs extensions
Previous Message David E. Wheeler 2009-05-28 21:19:10 Re: plperl error format vs plpgsql error format vs pgTAP