public inbox for [email protected]  
help / color / mirror / Atom feed
From: Halley Pacheco de Oliveira <[email protected]>
To: [email protected]
Cc: Roman Neuhauser <[email protected]>
Subject: Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity
Date: Tue, 26 Jul 2005 14:17:17 -0300 (ART)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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 <[email protected]> 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/



view thread (11+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox