how to determine what a process is doing

From: Alex Howansky <alex(at)wankwood(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: how to determine what a process is doing
Date: 2000-11-29 21:08:37
Message-ID: Pine.LNX.4.30.0011291434150.11332-100000@net-srv-0001.bvrd.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message kurt miller 2000-11-29 21:20:59 ExecRestrPos: node type 18 not supported
Previous Message Tom Lane 2000-11-29 20:59:06 Re: Bug? 'psql -l' in pg_ctl?