pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mitch Vincent <mitch@doot.org>
To: PostGreSQL PHP Group <pgsql-php@postgresql.org>
To: Chris Ruprecht <chrup999@yahoo.com>
Subject: Re: pg_pconnect - ??
Date: Mon, 28 Jan 2002 14:12:27 -0700
Message-ID: <00e201c1a840$7e4bba70$0200000a@Mitch> (raw)
References: <3.0.6.32.20020128141957.02130660@pop6.sympatico.ca>
	<009a01c1a835$f2d76520$0200000a@Mitch>
	<p05101218b87b6220cfa3@[192.168.0.6]>

> Ok, so from what I see on here, pg_pconnect doesn't have any
> advantages over pg_connect in my situation. I have the web server
> running on the same machine as the database server and yes, I have
> allocated 16384 shared buffers (at 8 KB each, this is 128 MB of
> shared memory). I have not noticed any connect overhead when opening
> a web page which connects to the database (99% of them do), the
> connection is instantaneously, so I guess, I don't need to do
> anything here.

Well it does take time to startup another pg process, it's just a tiny
amount of time with your current utilization. Sometimes a few miliseconds
can add up (say if you were spawning many processes per second).. Still,
you're right, it doesn't look like persistant connections are going to offer
you much increase in performance so I wouldn't bother.. Note that I've
*alway* had problems getting them to even work correctly with PHP --
supposedly things were fixed in alter 4.0.x releases but I've not tested it
much to say for certain.

> I was under the impression, that a persistent connection would open
> one and only one process which then will be used all the time without
> creating more child processes which keep lingering about. I guess, I
> was wrong here ...

That's a pretty common misunderstanding about what persistent conenctions
are, no worries..


-Mitchell





view thread (26+ messages)  latest in thread

Message-ID: <00e201c1a840$7e4bba70$0200000a@Mitch>
Permalink:  ../00e201c1a840$7e4bba70$0200000a@Mitch/
Also on:    postgresql.org/message-id/00e201c1a840$7e4bba70$0200000a@Mitch

 · 

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: mitch@doot.org, chrup999@yahoo.com
  Subject: Re: pg_pconnect - ??
  In-Reply-To: <00e201c1a840$7e4bba70$0200000a@Mitch>
  References: <3.0.6.32.20020128141957.02130660@pop6.sympatico.ca> <009a01c1a835$f2d76520$0200000a@Mitch> <p05101218b87b6220cfa3@[192.168.0.6]> <00e201c1a840$7e4bba70$0200000a@Mitch>

* 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