Re: pg_stat_get_backen_last_activity() ???

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_stat_get_backen_last_activity() ???
Date: 2003-01-17 23:11:21
Message-ID: 19554.1042845081@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sean Chittenden <sean(at)chittenden(dot)org> writes:
> Is there any notion of pg_stat_get_backend_last_activity()? I've got
> a rogue process someplace and I'm having a devil of a time tracking
> down which process is not committing its transaction and letting the
> rest of the world continue to access the tables.

Perhaps look in pg_locks to see who's holding the oldest open
transaction number, or who's got the most locks that other people
are waiting for? That should get you at least the PID of the offender.
Then use ps and/or pg_stat_activity to figure out what the offender
is doing.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-01-17 23:13:17 Re: change in behaviour? Is this a regression in function?
Previous Message Tom Lane 2003-01-17 23:06:52 Re: Terrible performance on wide selects