Re: improvement proposition

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: depesz(at)depesz(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: improvement proposition
Date: 2007-10-16 15:16:46
Message-ID: 16650.1192547806@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hubert depesz lubaczewski <depesz(at)depesz(dot)com> writes:
> 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.

Turn on log_statement. I don't believe the feature you are asking for
will be nearly as useful as you think. More than likely, what it
will show you is something like "commit; begin" and you'll be little
wiser than before. What you'll need to identify the problem will be a
trace of everything the app did; which is what the log is for, not
pg_stat_activity.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Shepherd 2007-10-16 15:21:00 variable in COPY <table> TO variable
Previous Message Scott Marlowe 2007-10-16 15:11:06 Re: Group By question