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

From: "Karthikeyan Sundaram" <skarthi98(at)hotmail(dot)com>
To: gpavlov(at)mynewplace(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 22:16:42
Message-ID: BAY131-F184F459B61FD363B91BA2DB0740@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

George,

How will I enable command string to see the commands?

Regards
skarthi

>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: Wed, 21 Mar 2007 14:56:50 -0700
>
> > 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.)
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate

_________________________________________________________________
Its tax season, make sure to follow these few simple tips
http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMMartagline

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message George Pavlov 2007-03-21 22:25:05 Re: [SQL] Monitor what command is executing at the backend
Previous Message George Pavlov 2007-03-21 21:56:50 Re: [SQL] Monitor what command is executing at the backend

Browse pgsql-sql by date

  From Date Subject
Next Message George Pavlov 2007-03-21 22:25:05 Re: [SQL] Monitor what command is executing at the backend
Previous Message George Pavlov 2007-03-21 21:56:50 Re: [SQL] Monitor what command is executing at the backend