Re[2]: How to identify connected Users?
От | Bruno Dickhoff |
---|---|
Тема | Re[2]: How to identify connected Users? |
Дата | |
Msg-id | 97690700144.20001203161040@dickhoff.de обсуждение исходный текст |
Ответ на | Re: How to identify connected Users? (Dmitry Morozovsky <marck@rinet.ru>) |
Список | 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@dickhoff.de
В списке pgsql-admin по дате отправления: