From: | Halley Pacheco de Oliveira <halleypo(at)yahoo(dot)com(dot)br> |
---|---|
To: | pgsql-docs(at)postgresql(dot)org |
Cc: | Roman Neuhauser <neuhauser(at)sigpipe(dot)cz> |
Subject: | Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity |
Date: | 2005-07-26 17:17:17 |
Message-ID: | 20050726171717.51812.qmail@web52702.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
What surprises me is not that the previous connection is closed and a new connection is opened.
What surprises me is the fact that the previous process is killed and a new process is forked just
to connect to another database with the same user. I was expecting that the new connection could
use the same process. If you are monitoring user activity you must know that when the user
connects to another database another process is created, or even worst, if the user connects to
the same database again another process is created.
psql -U sistemas -h 192.168.0.1 teste
ps aux | grep ^postgres
postgres 3910 0.0 0.3 20320 2000 ? S 10:31 0:00 /usr/bin/postmaster -p 5432 -D
/var/lib/pgsql/data
postgres 3968 0.0 0.3 11120 1792 ? S 10:31 0:00 postgres: stats buffer process
postgres 3969 0.0 0.3 10128 1844 ? S 10:31 0:00 postgres: stats collector process
postgres 14006 0.0 0.5 20720 2640 ? S 14:08 0:00 postgres: sistemas teste
192.168.0.1 idle
teste=# \c teste
ps aux | grep ^postgres
postgres 3910 0.0 0.3 20320 2000 ? S 10:31 0:00 /usr/bin/postmaster -p 5432 -D
/var/lib/pgsql/data
postgres 3968 0.0 0.3 11120 1792 ? S 10:31 0:00 postgres: stats buffer process
postgres 3969 0.0 0.3 10128 1844 ? S 10:31 0:00 postgres: stats collector process
postgres 14038 0.0 0.5 20720 2608 ? S 14:09 0:00 postgres: sistemas teste
192.168.0.1 idle
It was not clear to me this relationship between connection and process. Now it is.
Regards,
Halley
--- Roman Neuhauser <neuhauser(at)sigpipe(dot)cz> escreveu:
>
> If anywhere, such information would belong to the psql(1)
> documentation, where it already is:
>
> \connect (or \c) [ dbname [ username ] ]
> Establishes a connection to a new database and/or under a user
> name. The previous connection is closed.
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis.
Instale o discador agora! http://br.acesso.yahoo.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Roman Neuhauser | 2005-07-26 19:49:01 | Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity |
Previous Message | Roman Neuhauser | 2005-07-26 15:26:46 | Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity |