Re: is libpq thread-safe?

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: npat(at)kmp(dot)forthnet(dot)gr
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: is libpq thread-safe?
Date: 2000-12-14 21:22:13
Message-ID: 20001214132213.G4589@fw.wintelcom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* npat(at)kmp(dot)forthnet(dot)gr <npat(at)kmp(dot)forthnet(dot)gr> [001214 13:20] wrote:
> A staight forward question:
>
> Is "libpq" thread-safe??
>
> And an elaboration:
>
> I want to write a server that opens-up a number of connections
> to a PostgreSQL database, and then spawns threads handing a connection
> object (PGconn) to each thread, so that all the threads can
> perform data-base operations (queries) simultaneously. Each thread will
> use its own connection object. Will this work??

These are answered in the online docs. Libpq is threadsafe with a
few exceptions, see the docs for functions you shouldn't call.

--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
"I have the heart of a child; I keep it in a jar on my desk."

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff MacDonald 2000-12-14 21:34:41 Re: Postgres demographics?
Previous Message Joseph Shraibman 2000-12-14 21:16:11 Re: Re: Help!Can't connect Postgresql JDBC driver