Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 2A3AA9FBAD6; Wed, 21 Mar 2007 19:16:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 66737-01; Wed, 21 Mar 2007 19:16:44 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from bay0-omc1-s21.bay0.hotmail.com (bay0-omc1-s21.bay0.hotmail.com [65.54.246.93]) by postgresql.org (Postfix) with ESMTP id 2A3169FBA7E; Wed, 21 Mar 2007 19:16:48 -0300 (ADT) Received: from hotmail.com ([65.55.136.98]) by bay0-omc1-s21.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Wed, 21 Mar 2007 15:16:46 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 21 Mar 2007 15:16:46 -0700 Message-ID: Received: from 65.55.136.123 by by131fd.bay131.hotmail.msn.com with HTTP; Wed, 21 Mar 2007 22:16:42 GMT X-Originating-IP: [67.116.31.14] X-Originating-Email: [skarthi98@hotmail.com] X-Sender: skarthi98@hotmail.com In-Reply-To: <8C5B026B51B6854CBE88121DBF097A869869D1@ehost010-33.exch010.intermedia.net> From: "Karthikeyan Sundaram" To: gpavlov@mynewplace.com, pgsql-admin@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] Monitor what command is executing at the backend Date: Wed, 21 Mar 2007 15:16:42 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 21 Mar 2007 22:16:46.0062 (UTC) FILETIME=[9CDC10E0:01C76C06] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/154 X-Sequence-Number: 24978 George, How will I enable command string to see the commands? Regards skarthi >From: "George Pavlov" >To: "Karthikeyan Sundaram" >,, >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 _________________________________________________________________ It’s tax season, make sure to follow these few simple tips http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMMartagline