Re: [SQL] Monitor what command is executing at the backend

From: "George Pavlov" <gpavlov(at)mynewplace(dot)com>
To: "Karthikeyan Sundaram" <skarthi98(at)hotmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [SQL] Monitor what command is executing at the backend
Date: 2007-03-21 21:56:50
Message-ID: 8C5B026B51B6854CBE88121DBF097A869869D1@ehost010-33.exch010.intermedia.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

> Is there a way to see from the log files on what sql statement is
> currently by which user? In other words, I want to monitor
> the DB activity.

for a current snapshot you don't need the logs, try:

select * from pg_stat_activity;

(command string needs to be enabled for your database.)

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Karthikeyan Sundaram 2007-03-21 22:16:42 Re: [SQL] Monitor what command is executing at the backend
Previous Message Karthikeyan Sundaram 2007-03-21 21:49:43 Monitor what command is executing at the backend

Browse pgsql-sql by date

  From Date Subject
Next Message Karthikeyan Sundaram 2007-03-21 22:16:42 Re: [SQL] Monitor what command is executing at the backend
Previous Message Karthikeyan Sundaram 2007-03-21 21:49:43 Monitor what command is executing at the backend