From: | Chris Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: improvement proposition |
Date: | 2007-10-16 21:42:10 |
Message-ID: | 60abqilost.fsf@dba2.int.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
ron(dot)l(dot)johnson(at)cox(dot)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(at)~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."
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2007-10-16 21:44:44 | Re: insert continue on error |
Previous Message | Raymond O'Donnell | 2007-10-16 21:39:19 | Re: Preserving view source code |