RE: pg_connect vs. pg_pconnect

Поиск
Список
Период
Сортировка
От Brent R. Matzelle
Тема RE: pg_connect vs. pg_pconnect
Дата
Msg-id 20010809134919.9991.qmail@web13008.mail.yahoo.com
обсуждение исходный текст
Ответ на RE: pg_connect vs. pg_pconnect  ("Hunter, Ray" <rhunter@enterasys.com>)
Список pgsql-php
--- "Hunter, Ray" <rhunter@enterasys.com> wrote:
> Chris,
>
> I am including the php source that has the pg_pconnect and the
> problems.  On
> one php page, I am query the database multilple times to get
> specific data
> in order to populate a table for our engineers.
>
> I have to use it on the create_sub_table function.
>
> I have no idea why it does not work.

I personally never mix connection types as I always use
pg_pconnect() for every connection call.  I consistently get one
PostgreSQL process for each Apache process.

Your code opens up a new PostgreSQL connection for each function
call, except for create_sub_table().  As a result, you can have
many idle database processes for each httpd process.  You can
count on each non-pg_pconnect() connection to linger for a
minute or so and that will eat all your system resources with
only a few simultaneous users.

Brent

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

В списке pgsql-php по дате отправления:

Предыдущее
От: "Hunter, Ray"
Дата:
Сообщение: RE: RE: pg_connect vs. pg_pconnect
Следующее
От: "Hunter, Ray"
Дата:
Сообщение: RE: pg_connect vs. pg_pconnect