Search Postgresql Archives

Re: improvement proposition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hubert depesz lubaczewski <depesz@xxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux