Re: using the same connection?

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: mathieu_dube(at)videotron(dot)ca, Mathieu Dube <mathieu_dube(at)videotron(dot)ca>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: using the same connection?
Date: 2001-02-07 08:37:48
Message-ID: 981535068.3a81095ccf8a9@webmail.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Quoting Mathieu Dube <mathieu_dube(at)videotron(dot)ca>:

> Hi y'all,
> Is it a bad idea for an app to keep just a couple of connections to a
> database, put semaphore/mutex on them and reuse them all through the
> program?
> Of course I would check if their PQstatus isnt at CONNECTION_BAD and
> reconnect if they were...
> I need some opinions on that practice...

In the Java world it's called ConnectionPooling and is standard practice,
especially with Servlets/JSP/EJB's.

Peter

--
Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Karel Zak 2001-02-07 09:20:35 Re: a contrib function to query current locale values
Previous Message Emmanuel Charpentier 2001-02-07 08:14:25 ODBC protocol changes in 7.1 ? And to pgaccess ?