Re: pg_pconnect - ??

From: "Mitch Vincent" <mitch(at)doot(dot)org>
To: "PostGreSQL PHP Group" <pgsql-php(at)postgresql(dot)org>, "Chris Ruprecht" <chrup999(at)yahoo(dot)com>
Subject: Re: pg_pconnect - ??
Date: 2002-01-28 21:12:27
Message-ID: 00e201c1a840$7e4bba70$0200000a@Mitch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

> 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

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Chris Ruprecht 2002-01-28 21:31:00 Re: pg_pconnect - ??
Previous Message Chadwick Rolfs 2002-01-28 21:07:17 Re: pg_pconnect - ??