Thread: Logging of autovacuum activity

Logging of autovacuum activity

From
"Markus Wollny"
Date:
Hi,

I am a bit stuck finding out how to log autovacuum activity in PostgreSQL 8.2. In the olden times I used to pipe the
pg_autovacuumdaemon's output to a file. Now pg_autovacuum has become part of the core, I wonder if there's some other
possibilityof monitoring its activity? 

I've got the following logging-settings set:
client_min_messages = error
log_min_messages = notice
log_error_verbosity = default
log_min_error_statement = notice
log_min_duration_statement = -1
log_line_prefix = '<%t - %p: %r@%d>'

Everything else is commented out, i.e. set to defaults. There is however nothing to be found in the logs concerning
autovacuumor any standard vacuum at all. I couldn't find anything in the docs regarding the specific logging of vacuum
runs.For my nightly vacuum maintenance job, I simply pipe sterr of vacuum verbose analyze to a separate logfile.
Concerningautovacuum, I'd like to have some info on when it runs and which tables it has processed. It is running for
sure,I can often see the autovacuum process pop up in top. I only see no means of finding out what it actually does
whenit's running. 

Kind regards

   Markus


Computec Media AG
Sitz der Gesellschaft und Registergericht: Fürth (HRB 8818)
Vorstandsmitglieder: Johannes S. Gözalan (Vorsitzender) und Rainer Rosenbusch
Vorsitzender des Aufsichtsrates: Jürg Marquard
Umsatzsteuer-Identifikationsnummer: DE 812 575 276



Re: Logging of autovacuum activity

From
Simon Riggs
Date:
On Tue, 2008-04-01 at 21:02 +0200, Markus Wollny wrote:

> I am a bit stuck finding out how to log autovacuum activity in
> PostgreSQL 8.2. In the olden times I used to pipe the pg_autovacuum
> daemon's output to a file. Now pg_autovacuum has become part of the
> core, I wonder if there's some other possibility of monitoring its
> activity?

That's a new feature in 8.3. If you did have it you'd realise you want
the other features in 8.3 also. Upgrade recommended.

--
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com

  PostgreSQL UK 2008 Conference: http://www.postgresql.org.uk


Re: Logging of autovacuum activity

From
Ben
Date:
select schemaname,relname,last_autovacuum,last_autoanalyze from pg_stat_user_tables;

...should get you what you're after.

On Tue, 1 Apr 2008, Markus Wollny wrote:

> Hi,
>
> I am a bit stuck finding out how to log autovacuum activity in PostgreSQL 8.2. In the olden times I used to pipe the
pg_autovacuumdaemon's output to a file. Now pg_autovacuum has become part of the core, I wonder if there's some other
possibilityof monitoring its activity? 
>
> I've got the following logging-settings set:
> client_min_messages = error
> log_min_messages = notice
> log_error_verbosity = default
> log_min_error_statement = notice
> log_min_duration_statement = -1
> log_line_prefix = '<%t - %p: %r@%d>'
>
> Everything else is commented out, i.e. set to defaults. There is however nothing to be found in the logs concerning
autovacuumor any standard vacuum at all. I couldn't find anything in the docs regarding the specific logging of vacuum
runs.For my nightly vacuum maintenance job, I simply pipe sterr of vacuum verbose analyze to a separate logfile.
Concerningautovacuum, I'd like to have some info on when it runs and which tables it has processed. It is running for
sure,I can often see the autovacuum process pop up in top. I only see no means of finding out what it actually does
whenit's running. 
>
> Kind regards
>
>   Markus
>
>
> Computec Media AG
> Sitz der Gesellschaft und Registergericht: Fürth (HRB 8818)
> Vorstandsmitglieder: Johannes S. Gözalan (Vorsitzender) und Rainer Rosenbusch
> Vorsitzender des Aufsichtsrates: Jürg Marquard
> Umsatzsteuer-Identifikationsnummer: DE 812 575 276
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>