Re: libpq not reentrant - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: libpq not reentrant
Date
Msg-id 200201181925.g0IJPbI04777@candle.pha.pa.us
Whole thread Raw
In response to Re: libpq not reentrant  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > As of 7.2 we are only going to recommend crypt for backward
> > compatibility with older releases.  I will add a mention in libpq docs
> > that crypt authentication is not thread-safe.  Even when crypt did work
>                             ^^^^^^
> "may not be"
>
> > it wasn't always portable between OS's.  Is that how we want to go?

OK, new text for docs.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: doc/src/sgml/libpq.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v
retrieving revision 1.85
diff -c -r1.85 libpq.sgml
*** doc/src/sgml/libpq.sgml    2002/01/07 02:29:12    1.85
--- doc/src/sgml/libpq.sgml    2002/01/18 19:24:22
***************
*** 2109,2118 ****
  <para>
  <filename>libpq</filename> is thread-safe as of
  <productname>PostgreSQL</productname> 7.0, so long as no two threads
! attempt to manipulate the same <structname>PGconn</> object at the same time.  In particular,
! you cannot issue concurrent queries from different threads through the same
! connection object.  (If you need to run concurrent queries, start up multiple
! connections.)
  </para>

  <para>
--- 2109,2125 ----
  <para>
  <filename>libpq</filename> is thread-safe as of
  <productname>PostgreSQL</productname> 7.0, so long as no two threads
! attempt to manipulate the same <structname>PGconn</> object at the same
! time. In particular, you cannot issue concurrent queries from different
! threads through the same connection object. (If you need to run
! concurrent queries, start up multiple connections.)
! </para>
! <para>
! However, <filename>libpq</filename> clients using the
! <literal>crypt</literal> encryption method rely on the
! <literal>crypt()</literal> operating system function, which often is not
! thread-safe. It is better to use <literal>MD5</literal> encryption,
! which is guarantted to be thread-safe on all platforms.
  </para>

  <para>

pgsql-bugs by date:

Previous
From: Federico Di Gregorio
Date:
Subject: Re: postgres error on debian woody
Next
From: Bruce Momjian
Date:
Subject: Re: libpq not reentrant