ENC: [imp] Postgres and Persistent Conections

Alexander E. Belck alexb@iol.psi.br
Mon, 5 Mar 2001 19:20:28 -0300


So far I understood, all pg_pconnect where replaced by pg_connect in version
2.2.4 and I wonder why there is still a pg_pconnect in
.../horde/imp/lib/db.pgsql.

The errors that this change causes follows (I copyed them after trying to
login with db.pgsql changed to use pg_connect):

Warning: 1 is not a valid PostgreSQL link resource in
/usr/local/apache/php/db_pgsql.inc on line 52

Warning: 1 is not a valid PostgreSQL link resource in
/usr/local/apache/php/db_pgsql.inc on line 55

Warning: 1 is not a valid PostgreSQL link resource in
/usr/local/apache/php/db_pgsql.inc on line 67

Warning: Cannot add header information - headers already sent by (output
started at /usr/local/apache/php/db_pgsql.inc:52) in
/home/vhost/spsul.com.br/www/horde/lib/horde.lib on line 531

Warning: Cannot add header information - headers already sent by (output
started at /usr/local/apache/php/db_pgsql.inc:52) in
/home/vhost/spsul.com.br/www/horde/imp/templates/doctype.inc on line 8

Warning: 1 is not a valid PostgreSQL link resource in
/usr/local/apache/php/db_pgsql.inc on line 52

Warning: 1 is not a valid PostgreSQL link resource in
/usr/local/apache/php/db_pgsql.inc on line 55

Warning: Supplied argument is not a valid PostgreSQL result resource in
/usr/local/apache/php/db_pgsql.inc on line 122

Warning: 1 is not a valid PostgreSQL link resource in
/usr/local/apache/php/db_pgsql.inc on line 52

Warning: 1 is not a valid PostgreSQL link resource in
/usr/local/apache/php/db_pgsql.inc on line 55

			----------------------------

I don't use the default 32 backends of Postgres and I got the problem with
just a single user. See my processes:

[root@paca lib]# ps fax|grep pos
14076 ?        S      0:00 /usr/bin/postmaster -i -S -D/var/lib/pgsql -B
196 -N
15869 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
15885 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
15897 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
15919 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
16075 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
16304 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
16370 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
17023 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
17032 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
17072 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
17093 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
17107 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle
17133 ?        S      0:00  \_ /usr/bin/postgres 127.0.0.1 hordemgr horde
idle

Thanks,

Alex

-----Mensagem original-----
De: Rich Lafferty [mailto:rich@bofh.concordia.ca]Em nome de Rich
Lafferty
Enviada em: quinta-feira, 1 de março de 2001 23:06
Para: imp@lists.horde.org
Assunto: Re: [imp] Postgres and Persistent Conections


On Thu, Mar 01, 2001 at 07:21:04PM -0300, Alexander E. Belck
(alexb@iol.psi.br) wrote:
> > I'm trying to use horde-1.2.4 with imp-2.2.4 with Postgres wher I still
> > (I'm upgrading from 1.2.3/2.2.3) have problems with persistent
conections.
> > I searched all documents and found that .../hord/imp/lib/db.pgsql at
> > function imp_open_pg_db() still use 'pg_pconnect'.
> >
> > I tryed to modify this to 'pg_connect' but this generates a lot of erros
> > when I try to login at IMP.

*What* errors? Changing all occurrences of 'pg_pconnect' to
'pg_connect' is not only okay, but has already been done in cvs. We
use it here on a machine that gets up to two thousand logins a day
with no problems at all.

I suspect the errors are related to something else (like, say, running
out of postgres connections -- you're not using the default of 32
backends/32 buffers, are you?)

  -Rich

--
------------------------------ Rich Lafferty ---------------------------
 Sysadmin/Programmer, Instructional and Information Technology Services
   Concordia University, Montreal, QC                 (514) 848-7625
------------------------- rich@alcor.concordia.ca ----------------------

--
IMP mailing list: http://horde.org/imp/
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: imp-unsubscribe@lists.horde.org