pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: David BOURIAUD <david.bouriaud@ac-rouen.fr>
To: pgsql-sql@postgresql.org
Subject: Re: About persistent connections...
Date: Fri, 1 Mar 2002 16:06:12 +0000
Message-ID: <E16gpXl-0001rb-00@stan.ringways.co.uk> (raw)
In-Reply-To: <200203011531.g21FVSQ25356@necker.ac-rouen.fr>
References: <200203011531.g21FVSQ25356@necker.ac-rouen.fr>

On Friday 01 March 2002 3:29 pm, David BOURIAUD wrote:
> Hi to all !
>
> Does anyone know how the postmaster handles persistent connections ?
> I use to use them with php, but yet I haven't upgraded to postgreSQL 7.2,
> I'm still on version 7.1.3, and it occured to me that when my users close
> their browser rather than click on the quit button I provided, their
> connection remains alive and is never closed. Is there a way to set it up
> so that such connections are closed after a certain amount of time of
> inactivity, as it is done with ftp for example ? Thanks by advance for your
> help.

Hi Dave,

The whole point of a persistant connection is that it doesn't close.  HTTP is 
completely stateless and unless you do clever stuff like session management, 
every visit to the site is totally seperate.  The connection process for Pg 
is slow, and the point of persistent connections is to get round this.

If you are using persistent connections, then the user clicking quit will 
make no difference anyway.  The only way to close the connection is to either 
restart the web server, or restart Postmaster.

As a site note, it would be nice to be able to set a timeout for a persistant 
connection so that periodically the connection is closed, and a new clean 
connection made on request.

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     



view thread (5+ messages)  latest in thread

Message-ID: <E16gpXl-0001rb-00@stan.ringways.co.uk>
Permalink:  ../E16gpXl-0001rb-00@stan.ringways.co.uk/
Also on:    postgresql.org/message-id/E16gpXl-0001rb-00@stan.ringways.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gary.stainburn@ringways.co.uk, david.bouriaud@ac-rouen.fr
  Subject: Re: About persistent connections...
  In-Reply-To: <E16gpXl-0001rb-00@stan.ringways.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox