X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B0BF452AE4 for ; Thu, 18 Aug 2005 15:10:43 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67159-10 for ; Thu, 18 Aug 2005 18:10:31 +0000 (GMT) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.192]) by svr1.postgresql.org (Postfix) with ESMTP id 6272A52C60 for ; Thu, 18 Aug 2005 15:10:30 -0300 (ADT) Received: by nproxy.gmail.com with SMTP id c2so81393nfe for ; Thu, 18 Aug 2005 11:10:30 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=ANXoYY/CDlR5hOzPmIGBLsQWpmdXYLMU3i782oX8xPKMvP9Ihnu2kgB1Z2wJfR5nKFXIde2ZDmSqDOjHgbn3c0M1QnDXgVQbZ8ZFbllhnAK4Kb7nzPSxqTOP+O43dPLC45/4dFzlc1rCR0wbgsUrKxSUEdVIFXGLGuAoP9nGwoE= Received: by 10.48.249.12 with SMTP id w12mr56338nfh; Thu, 18 Aug 2005 11:10:30 -0700 (PDT) Received: by 10.48.144.16 with HTTP; Thu, 18 Aug 2005 11:10:30 -0700 (PDT) Message-ID: Date: Thu, 18 Aug 2005 19:10:30 +0100 From: Guido Barosio To: Lane Van Ingen Subject: Re: How to Control the Persistence of A PostgreSQL Connection Cc: pgsql-admin@postgresql.org In-Reply-To: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2488_31722846.1124388630598" References: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.379 required=5 tests=[AWL=-0.150, HTML_20_30=0.504, HTML_MESSAGE=0.001, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200508/240 X-Sequence-Number: 18559 ------=_Part_2488_31722846.1124388630598 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline While this is strictly related to the administration of a rdbms, I don't=20 actully know if it is a matter of the rdbms software to control the=20 connection timeout. (This is something that major rdbms providers, oracle,= =20 ms, give as a solution, but I am not sure if that is a good habit, asuming= =20 that in production enviroment you will have a firewall and may be also=20 network configurations that may affect the rdbms connection behaviour. But = I=20 guess this is a new discussion, and won't help with your current problem ;)= =20 ) As far as I know, this would go hand on hand with "under the bridge" tcp/i= p=20 settings. (A few days ago a discussion run against a similar issue, look fo= r=20 it in the archives) Now, postgresql does not has a native pooling method (or no that I am awar= e=20 of), but you will find many third party solutions for that. In the postgresql.conf file, you will find a parameter max_connections or= =20 alike, where you will have to play with that value, as well as with your=20 memory resources parameters. Remember that connections and memory usage are= =20 close in hands, to make the thing work. My poor contribution :) Best wishes, Guido On 8/18/05, Lane Van Ingen wrote:=20 >=20 > Have been reading the manual and searching for connection timeout > information, but > I don't think what I have found answers my questions. Most of what I foun= d > so far > is C library functions in Chapter 27 on version 8.0 manual (am not a C > programmer). >=20 > I saw connection timeout discussed a little bit with login /=20 > authentication > type > parameters, but it had to do with getting in, not maintaining a=20 > connection. >=20 > We are connecting to PostgreSQL using clients running JBOSS. What I want= =20 > to > know is: > - from the PostgreSQL side, how long will a connection to the database be > kept open > if inactive for a period of time, and where are the parameter(s) to > affect that? > - does PostgreSQL do connection pooling? > - is there any way I can tell if I am getting into trouble on the number > of > connections open, and how long they have been open, outside of user > complaints > of lack of service (unable to connect)? >=20 > I am on Windows 2003, using version 8.0. >=20 >=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings >=20 --=20 "Adopting the position that you are smarter than an automatic optimization algorithm is generally a good way to achieve less performance, not more" - Tom Lane. ------=_Part_2488_31722846.1124388630598 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
While this is strictly related to the administration of a rdbms, I don= 't actully know if it is a matter of the rdbms software to control the conn= ection timeout. (This is something that major rdbms providers, oracle, ms, = give as a solution, but I am not sure if that is a good habit, asuming that= in production enviroment you will have a firewall and may be also network = configurations that may affect the rdbms connection behaviour. But I guess = this is a new discussion, and won't help with your current problem ;) )
 
As far as I know, this would go hand on hand with "under the brid= ge" tcp/ip settings. (A few days ago a discussion run against a simila= r issue, look for it in the archives)
 
Now, postgresql does not has a native pooling method (or no that I am = aware of), but you will find many third party solutions for that.
 
In the postgresql.conf file, you will find a parameter max_connections= or alike, where you will have to play with that value, as well as with you= r memory resources parameters. Remember that connections and memory usage a= re close in hands, to make the thing work.
 
My poor contribution :)
 
Best wishes,
Guido

 
On 8/18/05, = Lane Van Ingen <lvaningen@esn= cc.com> wrote:
Have been reading the manual and= searching for connection timeout
information, but
I don't think what= I have found answers my questions. Most of what I found
so far
is C library functions in Chapter 27 on version 8.0 manual (a= m not a C
programmer).

I saw connection timeout discussed a littl= e bit with login / authentication
type
parameters, but it had to do w= ith getting in, not maintaining a connection.

We are connecting to PostgreSQL using clients running JBOSS. What I= want to
know is:
- from the PostgreSQL side, how long will a connect= ion to the database be
kept open
   if inactive for a perio= d of time, and where are the parameter(s) to
affect that?
- does PostgreSQL do connection pooling?
- is there = any way I can tell if I am getting into trouble on the number
of
&nbs= p;  connections open, and how long they have been open, outside of use= r
complaints
   of lack of service (unable to connect)?

I am on Win= dows 2003, using version 8.0.



---------------------------(en= d of broadcast)---------------------------
TIP 5: don't forget to increa= se your free space map settings



--
"Adopting the = position that you are smarter than an automatic
optimization algorithm i= s generally a good way to achieve less
performance, not more" - Tom= Lane.=20 ------=_Part_2488_31722846.1124388630598--