Re: improvement proposition - Mailing list pgsql-general

From Chris Browne
Subject Re: improvement proposition
Date
Msg-id 60abqilost.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to improvement proposition  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-general
ron.l.johnson@cox.net (Ron Johnson) writes:
> On 10/16/07 08:21, hubert depesz lubaczewski wrote:
>> hi,
>> would it be possible for someone to add "last query" for
>> pg_stat_activity view?
>>
>> there is a lot of cases that we have "idle in transaction" sitting for
>> long time, and since we dont log all queries it is next to impossible to
>> tell where in app code the problem lies.
>> it would be very useful to get something like "previous query".
>
> Transaction analysis is the way to go here.  It requires a serious
> code review, though.
>
>> is adding something like this possible?

I don't think it's likely to happen any time soon, certainly not for
"legacy" versions of PostgreSQL.  (e.g. - this might *conceivably* be
material for version 8.4, but it won't be happening for any databases
presently in production)

On The Other Hand, the last time this happened and I got "called into
action" (which wasn't terribly long ago), I did a search on pg_locks
to see what locks the "<IDLE> in transaction" connection was holding
onto, and that provided enough information for us to infer which part
of the user code the system was in.
--
(format nil "~S@~S" "cbbrowne" "linuxdatabases.info")
http://linuxfinances.info/info/linuxdistributions.html
Signs of a Klingon Programmer - 7. "Klingon function calls do not have
'parameters' - they have 'arguments' -- and they ALWAYS WIN THEM."

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: need help with rebuilding postgresql
Next
From: jooy
Date:
Subject: Re: need help with rebuilding postgresql