pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Dickhoff <bruno@dickhoff.de>
To: Dmitry Morozovsky <marck@rinet.ru>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: Jens Hartwig <jhartwig@debis.com>
Cc: PostgreSQL Admin <pgsql-admin@postgresql.org>
Subject: Re[2]: How to identify connected Users?
Date: Sun, 3 Dec 2000 16:10:40 +0100
Message-ID: <97690700144.20001203161040@dickhoff.de> (raw)
In-Reply-To: <Pine.BSF.4.21.0012021714320.27250-100000@woozle.rinet.ru>
References: <Pine.BSF.4.21.0012021714320.27250-100000@woozle.rinet.ru>

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





Message-ID: <97690700144.20001203161040@dickhoff.de>
Permalink:  ../97690700144.20001203161040@dickhoff.de/
Also on:    postgresql.org/message-id/97690700144.20001203161040@dickhoff.de

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bruno@dickhoff.de, marck@rinet.ru, peter_e@gmx.net, jhartwig@debis.com
  Subject: Re: How to identify connected Users?
  In-Reply-To: <97690700144.20001203161040@dickhoff.de>
  References: <Pine.BSF.4.21.0012021714320.27250-100000@woozle.rinet.ru> <97690700144.20001203161040@dickhoff.de>

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

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