Re: [HACKERS] pgsql and threads don't match - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] pgsql and threads don't match
Date
Msg-id 34E47C96.FB65DEBD@alumni.caltech.edu
Whole thread Raw
In response to pgsql and threads don't match  ("Magnus Näslund" <Magnus@Graphicomp.Se>)
List pgsql-hackers
Magnus Näslund wrote:

> I'm a Linux developer that are making a huge server, and i'm trying out
> databases.
> Are the postgres librarys not thread-safe?
> If not, when will it be?

The Postgres backend is single-threaded software. The client stuff is
probably thread-safe, and both frontend and backend work with thread-safe
libraries. Clients can open multiple connections to backends, so I would
think that you could do so from multiple threads. You might need to take a
mutex on the connection-opening step; not sure about that. Also, there is
a separate process per backend connection, so multiple simultaneous
connections are allowed.

Good luck.

                                                             - Tom


pgsql-hackers by date:

Previous
From: Ryan Kirkpatrick
Date:
Subject: Re: [HACKERS] PostGreSQL v6.2.1 for Linux Alpha
Next
From: plh@opim.uconn.edu
Date:
Subject: a little patch to contrib/spi/refint.c