X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 40C1052E69 for ; Tue, 26 Jul 2005 14:17:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88427-09 for ; Tue, 26 Jul 2005 17:17:25 +0000 (GMT) Received: from web52702.mail.yahoo.com (web52702.mail.yahoo.com [206.190.48.225]) by svr1.postgresql.org (Postfix) with SMTP id C27C752BDC for ; Tue, 26 Jul 2005 14:17:21 -0300 (ADT) Received: (qmail 51818 invoked by uid 60001); 26 Jul 2005 17:17:17 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.br; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ibJbfRP298ueeAFtpEWc2453m8Bp87mCGMOs/yS6zXhZ7XTMfCPm/Icn/Nf8UuDlzeWBIcT1STg+XpKezl+OeZt/ZwXSFfi0SV0vOdRWlo23LKmEC+CLwzPhp+D7ioEGyOsbRewMRF7sE0YncTC+DuvDYibK/tAJp9wUCkKaUJA= ; Message-ID: <20050726171717.51812.qmail@web52702.mail.yahoo.com> Received: from [201.8.95.31] by web52702.mail.yahoo.com via HTTP; Tue, 26 Jul 2005 14:17:17 ART Date: Tue, 26 Jul 2005 14:17:17 -0300 (ART) From: Halley Pacheco de Oliveira Subject: Re: PostgreSQL 8.0.3 Documentation - Chapter 23. Monitoring Database Activity To: pgsql-docs@postgresql.org Cc: Roman Neuhauser In-Reply-To: <20050726152646.GA62797@isis.sigpipe.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.421 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200507/27 X-Sequence-Number: 3153 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 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/