how to determine what a process is doing - Mailing list pgsql-general

From Alex Howansky
Subject how to determine what a process is doing
Date
Msg-id Pine.LNX.4.30.0011291434150.11332-100000@net-srv-0001.bvrd.com
Whole thread Raw
Responses Re: how to determine what a process is doing
List pgsql-general
I've looked in the docs, Bruce's book, and the list archives, but I've been
unable to find an answer to this. Any help would be greatly appreciated.

I have a database front-ended by a web site. All queries (apart from a few cron
jobs and developer's manual tests) come from the web site through PHP. Lately,
my database server's load average has been spiking badly. There may be 50
concurrent queries running, and top shows that maybe three or four of them are
really sucking up the horsepower. I'd like to find out what these hog processes
are actually processing -- but it could be any one of a few hundred different
queries.  Is there any way to determine exactly what a postgres process is
doing at any time? The output from the ps command only shows "INSERT" or
"SELECT", and not the full query string.

TIA,

--
Alex Howansky
Wankwood Associates
http://www.wankwood.com/


pgsql-general by date:

Previous
From: "kurt miller"
Date:
Subject: ExecRestrPos: node type 18 not supported
Next
From: Tom Lane
Date:
Subject: Re: ExecRestrPos: node type 18 not supported