Received: from post.webmailer.de (natmail2.webmailer.de [192.67.198.65]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eB3FAJF11758 for ; Sun, 3 Dec 2000 10:10:20 -0500 (EST) (envelope-from bruno@dickhoff.de) Received: from p3E9D3920.dip.t-dialin.net (p3E9D3920.dip.t-dialin.net [62.157.57.32]) by post.webmailer.de (8.9.3/8.8.7) with ESMTP id QAA12711; Sun, 3 Dec 2000 16:10:18 +0100 (MET) Date: Sun, 3 Dec 2000 16:10:40 +0100 From: Bruno Dickhoff X-Mailer: The Bat! (v1.47 Halloween Edition) Personal Reply-To: Bruno Dickhoff X-Priority: 3 (Normal) Message-ID: <97690700144.20001203161040@dickhoff.de> To: Dmitry Morozovsky CC: Peter Eisentraut , Jens Hartwig , PostgreSQL Admin Subject: Re[2]: How to identify connected Users? In-reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200012/9 X-Sequence-Number: 199 Hello Dmitry, Saturday, December 02, 2000, 3:15:51 PM, you wrote: DM> On Fri, 1 Dec 2000, Peter Eisentraut wrote: PE>> > is there any way to identify users which are currently connected to the PE>> > database? Does perhaps even exist a method to notify this users (e.g. to PE>> > close the connection)? PE>> PE>> ps ax | grep postgres PE>> PE>> is the best way to go. DM> Nope. Using this you can identify UNIX users, instead of PG users. And, if DM> the scripts are running from the web server, there will be only DM> nobosy/httpd in most cases... Well, you have to divide into users of the database (which is indeed your webserver or the user specified in the jdbc url) and the users of your webpage. When a user opens a webpage, the webserver itself (or the servlet, jsp, php - whatever) opens the db connection and delivers the output back to the user. So the user of the db in that moment is your webserver, jsp, servlet... and not the user who is calling your webpage. The "user" that is connecting to your db is normally a generic user. In short: The user of your webpage and the db-user are normally not the same. -- Best regards, Bruno mailto:bruno@dickhoff.de