Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] libpq and multi-threading on Linux?

From: Brendan Rempel <rempelb(at)cybersurf(dot)net>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] libpq and multi-threading on Linux?
Date: 1999-02-11 08:59:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
I succeeded in doing exactly that.  I simply took the C source examples on
the Postgres documentation and pasted it into the thread with no problems
at all.  The only changes made to the examples were just simple ones like
return values or fprintf(stderr) stuff, but that's all. Postgres server
and libpq libraries run flawlessly in pthreads.

For me, synchronization was not required since each thread did not share
resources with other threads.  Each thread personally initialized the
libpq connection, did its job and destroyed the connection, just like the


Michael Olivier wrote:

> Hi folks,
> I apologize in advance if I have overlooked docs, but I haven't been
> able to find a discussion of how PostGreSQL via libpq on Linux fares
> with pthreads. Can someone point me to docs if available, or otherwise
> enlighten me? How well does it work and what are the important design
> issues to consider?
> I'm expecting to create a pool of db connections to use within a
> long-running process, which will create a new thread for each incoming
> request from a client. I've found just a very little bit about PG
> being multi-processing, but not how it will interact with a
> multi-threaded client. I appreciate your comments.
> thanks,
> --Michael
> _________________________________________________________
> Get your free address at

In response to

pgsql-interfaces by date

Next:From: Pascal DAYREDate: 1999-02-11 09:48:26
Subject: Troubles with the ODBC driver in the postgres distribution (integrated installation)
Previous:From: Sergey T. SoenkoDate: 1999-02-11 07:42:04

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group