Re: pg_stat_get_backen_last_activity() ??? - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_stat_get_backen_last_activity() ???
Date
Msg-id 19554.1042845081@sss.pgh.pa.us
Whole thread Raw
In response to pg_stat_get_backen_last_activity() ???  (Sean Chittenden <sean@chittenden.org>)
Responses Re: pg_stat_get_backen_last_activity() ???
List pgsql-general
Sean Chittenden <sean@chittenden.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

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: temporary tables
Next
From: Tom Lane
Date:
Subject: Re: Terrible performance on wide selects