From: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
---|---|
To: | leaf_yxj <leaf_yxj(at)163(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How to get the all the activities running during specific time range.Thanks!Plese help! |
Date: | 2012-04-27 22:27:05 |
Message-ID: | CAK3UJREec29Cd9bkd3ovqmhjvV2akPAaHS2=vCRWfQsjpdTuHw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Apr 27, 2012 at 7:32 AM, leaf_yxj <leaf_yxj(at)163(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Lonni J Friedman | 2012-04-27 23:25:01 | problems after restoring from a pg_basebackup |
Previous Message | J.V. | 2012-04-27 21:22:10 | How to update a newly added column with sub selects? |