>> Hello,
>>
>> I was wondering if there was a way in postgres to monitor
>> database sessions.
>>
>> I'd like to be able to get a list of currently open sessions
>> with information like user id, connection time etc.
>>
>> Also I'd like to be able to see a history of sessions; again
>> user id with session start & end times.
>>
> You can look at 'ps' output to see user, database, and current command
> type.
Good to know, but limited. to get the historical info, you'd have to continually spawn
ps and either generate a lot of overhead or miss events.
I think Stephen and I have roughly similar desires (ref "Logging Access" Sun, 03 Oct
1999 23:09:06 -0400)
It's not too hard to get the backend to report authentication requests, although as a
DBA, I'd ultimately
like logging to be up to modern-day quality expectations (e.g. filterable, routable,
and securable) and to record not only basic session info, but statistical info to
assist in tuning.
So, returning to my own question. Is any such presently available that I'm ignorant
of, or, failing that,
may I be of assitance in realizing such a facility?
Tim Holloway
MTS Associates, Inc.
************