From: | Bruno Dickhoff <bruno(at)dickhoff(dot)de> |
---|---|
To: | Dmitry Morozovsky <marck(at)rinet(dot)ru> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Jens Hartwig <jhartwig(at)debis(dot)com>, PostgreSQL Admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re[2]: How to identify connected Users? |
Date: | 2000-12-03 15:10:40 |
Message-ID: | 97690700144.20001203161040@dickhoff.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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(at)dickhoff(dot)de
From | Date | Subject | |
---|---|---|---|
Next Message | Philippe Le Naour | 2000-12-04 12:17:18 | failed sanity check with pg_dump |
Previous Message | Peter Eisentraut | 2000-12-02 16:31:12 | Re: How to identify connected Users? |