libpq: Exact meaning of 'thread-safe'?

From: Florian Weimer <Florian(dot)Weimer(at)RUS(dot)Uni-Stuttgart(dot)DE>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: libpq: Exact meaning of 'thread-safe'?
Date: 2001-01-24 16:02:32
Message-ID: tgae8h546f.fsf@mercury.rus.uni-stuttgart.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

From the documentation:

| libpq is thread-safe as of Postgres 7.0, so long as no two threads
| attempt to manipulate the same PGconn object at the same time. In
| particular, you can't issue concurrent queries from different threads
| through the same connection object. (If you need to run concurrent
| queries, start up multiple connections.)

Is it safe to perform sequential queries from different threads to the
same object? (On some systems, the process ID changes from thread to
thread, and this could have some side effects.)

Is it safe to assume that the accessor functions for connection
objects are task-safe and will remain it?

--
Florian Weimer Florian(dot)Weimer(at)RUS(dot)Uni-Stuttgart(dot)DE
University of Stuttgart http://cert.uni-stuttgart.de/
RUS-CERT +49-711-685-5973/fax +49-711-685-5898

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 2001-01-24 16:09:04 Re: Re: [PATCHES] Re: Fixes and enhancements to JDBC driver (take 2)
Previous Message Gunnar R|nning 2001-01-24 16:02:08 Re: Re: [PATCHES] Re: Fixes and enhancements to JDBC driver (take 2)