Skip site navigation (1) Skip section navigation (2)

Re: log_autovacuum

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: log_autovacuum
Date: 2007-04-17 22:57:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patchespgsql-www
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Alvaro Herrera wrote:
> >> Tom Lane wrote:
> >>> BTW, shouldn't the log entry distinguish whether this was VACUUM,
> >>> ANALYZE, or both?
> >> 
> >> We don't actually log anything for ANALYZE (the logging code is in
> >> lazy_vacuum_rel).
> >> 
> >> Maybe it should be in autovacuum.c.
> Actually, I had misunderstood where you were proposing to put this.
> I believe that where you have it, the elapsed-time indication will
> only cover the VACUUM step; so it's not relevant to this code whether
> an ANALYZE would happen too.


> My suggestion is that you add similar but independent logging to
> analyze.c, controlled by the same min-duration variable.  So the
> log output would treat autovac and autoanalyze as two independently
> loggable operations.  I don't think there's much to print about
> an autoanalyze except its runtime ... well, maybe you could print
> the numbers of rows sampled and estimated, but I dunno if it matters.
> The point of doing it is just to be able to track what the heck
> autovacuum is doing ...

Seems fair.  Updated patch attached.

If there are no further comments, I'll add some docs and apply it later.

Alvaro Herrera                      
The PostgreSQL Company - Command Prompt, Inc.

Attachment: log-autovacuum.patch
Description: text/x-diff (8.6 KB)

In response to


pgsql-www by date

Next:From: Alvaro HerreraDate: 2007-04-18 01:45:27
Subject: Re: log_autovacuum
Previous:From: Tom LaneDate: 2007-04-17 22:32:26
Subject: Re: log_autovacuum

pgsql-patches by date

Next:From: FAST PostgreSQLDate: 2007-04-18 01:23:11
Subject: Re: COPY-able csv log outputs
Previous:From: Tom LaneDate: 2007-04-17 22:32:26
Subject: Re: log_autovacuum

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group