pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedTOP SESSIONS?
2+ messages / 2 participants
[nested] [flat]
* TOP SESSIONS?
@ 2000-05-31 18:41 mikeo <mikeo@spectrumtelecorp.com>
0 siblings, 1 reply; 2+ messages in thread
From: mikeo @ 2000-05-31 18:41 UTC (permalink / raw)
To: pgsql-sql; pgsql-general@postgreSQL.org
hi,
in oracle you would use these two cursors to determine who was
connected and
what they were doing.
select distinct s.sid sid, s.serial# serial, s.status status, osuser,
spid ,
count(o.sid) counter, s.username username, s.program
program, sql_address
from v$session s, v$open_cursor o, v$process p
where s.sid = o.sid(+)
and paddr = addr
group by s.sid,s.serial#, s.status , osuser, spid ,s.username,
s.program ,sql_address
order by 1,3
select distinct name
from sys.audit_actions, v$sqltext
where address = ?
and action = command_type
<bold><color><param>0000,0000,8080</param><bigger>does anyone know what
tables in postgres would give me the same or similar information?
</bigger></color></bold>TIA,
mikeo
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: TOP SESSIONS?
@ 2000-05-31 23:32 Mike Mascari <mascarm@mascari.com>
parent: mikeo <mikeo@spectrumtelecorp.com>
0 siblings, 0 replies; 2+ messages in thread
From: Mike Mascari @ 2000-05-31 23:32 UTC (permalink / raw)
To: mikeo <mikeo@spectrumtelecorp.com>; +Cc: pgsql-sql; pgsql-general@postgreSQL.org
mikeo wrote:
>
> hi,
> in oracle you would use these two cursors to determine who was connected and
> what they were doing.
>
> select distinct s.sid sid, s.serial# serial, s.status status, osuser, spid ,
> count(o.sid) counter, s.username username, s.program program, sql_address
> from v$session s, v$open_cursor o, v$process p
> where s.sid = o.sid(+)
> and paddr = addr
> group by s.sid,s.serial#, s.status , osuser, spid ,s.username, s.program ,sql_address
> order by 1,3
>
> select distinct name
> from sys.audit_actions, v$sqltext
> where address = ?
> and action = command_type
>
> does anyone know what tables in postgres would give me the same or similar information?
>
> TIA,
> mikeo
PostgreSQL attempts to communicate what queries are being
performed by setting the process information in the connected
backend when processing a SQL statement, much like sendmail. You
should be able to determine who's connected and what they're
doing with something like:
ps axf
You'll see who's connected to what database from what machine and
the type of query being executed. I don't know of any tables in
PostgreSQL which would provide similar information.
Hope that helps,
Mike Mascari
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-05-31 23:32 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-05-31 18:41 TOP SESSIONS? mikeo <mikeo@spectrumtelecorp.com>
2000-05-31 23:32 ` Mike Mascari <mascarm@mascari.com>
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