Re: log_autovacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: log_autovacuum
Date: 2007-04-17 18:59:16
Message-ID: 4686.1176836356@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches pgsql-www

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Simon Riggs wrote:
>> Perhaps we need this as an integer, so we can log all vacuums that last
>> for longer in seconds than the setting, 0 logs all. That would
>> significantly reduce the volume if we set it to 5, say. That way you
>> would get your readability and I would get my reasonable size logs.

> It kinda smells funny to have a setting like that. Do we have a
> precedent? If other people is OK with it, I'll do that.

Sure, log_min_duration_statement. Applying the same concept to autovac
logging makes sense to me. In fact, what you've got now is equivalent
to an unconditional log_statement boolean, which is about where we were
three or four releases ago on statement logging. History suggests that
we'd soon want it to be more flexible than that. It seems sane to me
to skip the boolean stage and go straight to a threshold parameter.

> Also, why do it by time and not by amount of tuples/pages removed?

One, it's consistent with the way we do thresholded statement logging.
Two, time is a better indicator of effort expended --- consider
vacuuming a very large table that has only a few dead tuples.

We might want to add logging thresholds for pages/tuples later, but
for now I'd vote for just one parameter: a time threshold.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-04-17 19:01:57 Re: log_autovacuum
Previous Message Alvaro Herrera 2007-04-17 18:45:50 Re: log_autovacuum

Browse pgsql-www by date

  From Date Subject
Next Message Simon Riggs 2007-04-17 19:01:57 Re: log_autovacuum
Previous Message Alvaro Herrera 2007-04-17 18:45:50 Re: log_autovacuum