Re: how to determine what a process is doing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex Howansky <alex(at)wankwood(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to determine what a process is doing
Date: 2000-11-29 21:43:43
Message-ID: 8145.975534223@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alex Howansky <alex(at)wankwood(dot)com> writes:
> 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.

There isn't any really nice solution at the moment, but you could run
the postmaster with -d2 to cause writing of all queries to the
postmaster's log file (ie, its stdout/stderr). You'd probably also want
to compile with ELOG_TIMESTAMPS defined (see include/config.h) to get
timestamps and process PIDs included in the log. That'd give you info
to correlate against what "top" shows.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-11-29 22:09:07 Re: [GENERAL] Warning: Don't delete those /tmp/.PGSQL.* files
Previous Message Tom Lane 2000-11-29 21:38:25 Re: ExecRestrPos: node type 18 not supported