pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chadwick Rolfs <cmr@shell.gis.net>
To: Frank Joerdens <frank@joerdens.de>
Cc: PostGreSQL PHP Group <pgsql-php@postgresql.org>
Subject: Re: pg_pconnect - ??
Date: Sat, 2 Feb 2002 12:35:56 -0500 (EST)
Message-ID: <Pine.SOL.3.96.1020202122353.2997A-100000@shell.gis.net> (raw)
In-Reply-To: <20020202174138.A8112@superfly.archi-me-des.de>

On Sat, 2 Feb 2002, Frank Joerdens wrote:

> On Mon, Jan 28, 2002 at 02:19:57PM -0500, Frank Bax wrote:
> > The connection will only be reused if the *same* apache child process
> > handles the request.
> 
> IMHO, also if another apache child handles the request which also has a
> connection open to the same database using the same connection string.
> 
> [ . . . ]
> > If your postgres database is on the same server as you webserver, there is
> > neglible gains for using pconnect over connect.

> PII 400). It makes quite a difference, speed-wise, which would support
> my line of reasoning. I didn't try to measure this scientifically (or
> pseudo-scientifically, for that matter).

It's hard for me to tell here whether you are referring to
faster connections, or slower connections.  I know the query run time is
important in this discussion, so I assume the two latter statments above
are regarding connection time.

Frank: are you using pconnect?  If so: are you using it due to slower
connection times through your tcp/ip (?is what you're using, right?)
sockets?  -and- are you able to use unix sockets with solaris?  Does the
added physical layer make tcp/ip much slower, slower, or not at all?
Point me to the thread, please.

Personally, I see pconnects being used on the web/postgres/php server
here, and there are always about 10 children lying arond idle.  There is
no connection time difference between pconnect and connect.  I see no need
to use them.  When the database server does eventually move to it's own
box (maybe), I'm wondering if I should recommend persistence if connection
is slow... as well as a shorter connection timeout.

I'm also wondering if I should offer to change all those pconnect
statements to connect to save on resources that the idle children take
up.. ;P

Chadwick Rolfs - cmr@gis.net
Cleveland State University - Student
Music Major - The Holden Arboretum Volunteer
Computer Programmer - Student Employee
--*I finally found powdered water;
I just can't figure out what to add to it*--




view thread (26+ messages)  latest in thread

Message-ID: <Pine.SOL.3.96.1020202122353.2997A-100000@shell.gis.net>
Permalink:  ../Pine.SOL.3.96.1020202122353.2997A-100000@shell.gis.net/
Also on:    postgresql.org/message-id/Pine.SOL.3.96.1020202122353.2997A-100000@shell.gis.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: cmr@shell.gis.net, frank@joerdens.de
  Subject: Re: pg_pconnect - ??
  In-Reply-To: <Pine.SOL.3.96.1020202122353.2997A-100000@shell.gis.net>
  References: <20020202174138.A8112@superfly.archi-me-des.de> <Pine.SOL.3.96.1020202122353.2997A-100000@shell.gis.net>

* 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