Обсуждение: How to get the all the activities running during specific time range.Thanks!Plese help!

Поиск
Список
Период
Сортировка

How to get the all the activities running during specific time range.Thanks!Plese help!

От
leaf_yxj
Дата:
I was asked to run a report to my boss all the activities running during a
specific time range. I want to create a script to run it. I know I can query
from  pg_stat_activity for my previous postgres version. But I can't find
this system table in 8.2.15. Please help. Thanks. Regards. Grace.

--
View this message in context:
http://postgresql.1045698.n5.nabble.com/How-to-get-the-all-the-activities-running-during-specific-time-range-Thanks-Plese-help-tp5670460p5670460.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Re: How to get the all the activities running during specific time range.Thanks!Plese help!

От
Josh Kupershmidt
Дата:
On Fri, Apr 27, 2012 at 7:32 AM, leaf_yxj <leaf_yxj@163.com> wrote:
> I was asked to run a report to my boss all the activities running during a
> specific time range. I want to create a script to run it. I know I can query
> from  pg_stat_activity for my previous postgres version. But I can't find
> this system table in 8.2.15. Please help. Thanks. Regards. Grace.

According to the docs, the pg_stat_activity view should exist in 8.2:
  http://www.postgresql.org/docs/8.2/static/monitoring-stats.html

But I think it's the wrong tool for finding "all the activities
running during a specific time range". I would instead recommend
setting log_min_duration_statement to 0, at least for the time period
you are interested in, so that you can be sure you are logging all
queries:
  http://www.postgresql.org/docs/8.2/static/runtime-config-logging.html

Josh