Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity

Поиск
Список
Период
Сортировка
От Halley Pacheco de Oliveira
Тема Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity
Дата
Msg-id 20050726171717.51812.qmail@web52702.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity  (Roman Neuhauser <neuhauser@sigpipe.cz>)
Ответы Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity  (Roman Neuhauser <neuhauser@sigpipe.cz>)
Список 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 по дате отправления:

Предыдущее
От: Roman Neuhauser
Дата:
Сообщение: Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity
Следующее
От: Roman Neuhauser
Дата:
Сообщение: Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity