Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity - Mailing list pgsql-docs

From Halley Pacheco de Oliveira
Subject Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity
Date
Msg-id 20050726171717.51812.qmail@web52702.mail.yahoo.com
Whole thread Raw
In response to Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity  (Roman Neuhauser <neuhauser@sigpipe.cz>)
Responses Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity  (Roman Neuhauser <neuhauser@sigpipe.cz>)
List 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@sigpipe.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/

pgsql-docs by date:

Previous
From: Roman Neuhauser
Date:
Subject: Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity
Next
From: Roman Neuhauser
Date:
Subject: Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity