pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to identify connected Users?
6+ messages / 4 participants
[nested] [flat]

* How to identify connected Users?
@ 2000-12-01 10:40  Jens Hartwig <jhartwig@debis.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Jens Hartwig @ 2000-12-01 10:40 UTC (permalink / raw)
  To: pgsql-admin

Hello all,

is there any way to identify users which are currently connected to the
database? Does perhaps even exist a method to notify this users (e.g. to
close the connection)?

Thanks in advance and best regards, 

Jens

=============================================
Jens Hartwig
---------------------------------------------
debis Systemhaus GEI mbH
10875 Berlin
Tel.     : +49 (0)30 2554-3282
Fax      : +49 (0)30 2554-3187
Mobil    : +49 (0)170 167-2648
E-Mail   : jhartwig@debis.com
=============================================



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to identify connected Users?
@ 2000-12-01 15:05  Michel Decima <michel.decima@rd.francetelecom.fr>
  parent: Jens Hartwig <jhartwig@debis.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Michel Decima @ 2000-12-01 15:05 UTC (permalink / raw)
  To: pgsql-admin

>is there any way to identify users which are currently connected to the
>database? Does perhaps even exist a method to notify this users (e.g. to
>close the connection)?

 I don't know if this feature exists, but it will be very useful
 for me, too...



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to identify connected Users?
@ 2000-12-01 16:13  Peter Eisentraut <peter_e@gmx.net>
  parent: Jens Hartwig <jhartwig@debis.com>
  1 sibling, 2 replies; 6+ messages in thread

From: Peter Eisentraut @ 2000-12-01 16:13 UTC (permalink / raw)
  To: Jens Hartwig <jhartwig@debis.com>; +Cc: pgsql-admin

Jens Hartwig writes:

> is there any way to identify users which are currently connected to the
> database? Does perhaps even exist a method to notify this users (e.g. to
> close the connection)?

ps ax | grep postgres

is the best way to go.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to identify connected Users?
@ 2000-12-01 17:10  Michel Decima <michel.decima@rd.francetelecom.fr>
  parent: Peter Eisentraut <peter_e@gmx.net>
  1 sibling, 0 replies; 6+ messages in thread

From: Michel Decima @ 2000-12-01 17:10 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-admin

>Jens Hartwig writes:
>
>> is there any way to identify users which are currently connected to the
>> database? Does perhaps even exist a method to notify this users (e.g. to
>> close the connection)?
>
>ps ax | grep postgres
>
>is the best way to go.

 This command tells me that several backends are running, and owned by
 the postgres user... (all my users are connected via the LAN to the 
 database server). 

  




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to identify connected Users?
@ 2000-12-02 14:15  Dmitry Morozovsky <marck@rinet.ru>
  parent: Peter Eisentraut <peter_e@gmx.net>
  1 sibling, 1 reply; 6+ messages in thread

From: Dmitry Morozovsky @ 2000-12-02 14:15 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Jens Hartwig <jhartwig@debis.com>; pgsql-admin

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.

Nope. Using this you can identify UNIX users, instead of PG users. And, if
the scripts are running from the web server, there will be only
nobosy/httpd in most cases...

Sincerely,
D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: How to identify connected Users?
@ 2000-12-02 16:31  Peter Eisentraut <peter_e@gmx.net>
  parent: Dmitry Morozovsky <marck@rinet.ru>
  0 siblings, 0 replies; 6+ messages in thread

From: Peter Eisentraut @ 2000-12-02 16:31 UTC (permalink / raw)
  To: Dmitry Morozovsky <marck@rinet.ru>; +Cc: Jens Hartwig <jhartwig@debis.com>; pgsql-admin

Dmitry Morozovsky writes:

> PE> ps ax | grep postgres
> PE>
> PE> is the best way to go.
>
> Nope. Using this you can identify UNIX users, instead of PG users.

Wrong.

$ ps ax | grep postgres
 1236 pts/1    S      0:00 psql template1 -U postgres
 1237 pts/1    S      0:00 /usr/bin/postgres localhost postgres template1 idle

> And, if the scripts are running from the web server, there will be
> only nobosy/httpd in most cases...

The question was how to find out what users are connected to the database
-- there's your answer.  Or do you suggest figuring out the identity of
the person that connected to your web page?

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2000-12-02 16:31 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-12-01 10:40 How to identify connected Users? Jens Hartwig <jhartwig@debis.com>
2000-12-01 15:05 ` Michel Decima <michel.decima@rd.francetelecom.fr>
2000-12-01 16:13 ` Peter Eisentraut <peter_e@gmx.net>
2000-12-01 17:10   ` Michel Decima <michel.decima@rd.francetelecom.fr>
2000-12-02 14:15   ` Dmitry Morozovsky <marck@rinet.ru>
2000-12-02 16:31     ` Peter Eisentraut <peter_e@gmx.net>

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