Re: Monitoring PostgreSQL Process

From: "Tomeh, Husam" <htomeh(at)firstam(dot)com>
To: "Aaron Bono" <postgresql(at)aranya(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Monitoring PostgreSQL Process
Date: 2006-11-22 18:02:08
Message-ID: F1B0F9305B343E43A1C3EECE48B853D509308F@CITGSNA01SXCH02.ana.firstamdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

You may query the system view, pg_stat_activity to check out the current
SQL statements running. To track down executed SQL statements into a
physical log file, you may want to enable statement logging. For more
details on that, check out:
http://www.postgresql.org/docs/8.1/static/runtime-config-logging.html

Once you capture your SQL statement, you can run "explain" on it to
check out its execution plan.

--
Husam
http://firstdba.googlepages.com

________________________________

From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Aaron Bono
Sent: Tuesday, November 21, 2006 9:50 PM
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] Monitoring PostgreSQL Process

I have a couple processes/connections to one of our databases that
appears to be eating up most of the CPU and we are trying to determine
what these processes are doing that is taking so much CPU time.

Is there a way to monitor the SQL being run for a specific
connection/process?

We are using PostgreSQL 8.1.5 on CentOS Linux.

Thanks,
Aaron

--
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
http://codeelixir.com
==================================================================

**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged. If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

FADLD Tag
**********************************************************************

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Aaron Bono 2006-11-22 18:46:22 Re: Monitoring PostgreSQL Process
Previous Message Aaron Bono 2006-11-22 05:49:48 Monitoring PostgreSQL Process