Re: log_autovacuum - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: log_autovacuum
Date
Msg-id 20070417221804.GH15495@alvh.no-ip.org
Whole thread Raw
In response to Re: log_autovacuum  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: log_autovacuum
List pgsql-patches
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.

The only problem with this is that we would have to export struct
LVRelStats definition from vacuumlazy.c and pass the struct back ...
which wouldn't directly work on ANALYZE.  What we could do is pass back
a "void *" pointer, which lazyvacuum.c or the analyze code knows how to
turn into a string.

I have no problem both ways.  Here is the current patch (logging code
still in lazy_vacuum_rel, log_autovacuum morphed into an integer
variable).

Opinions?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachment

pgsql-patches by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: log_autovacuum
Next
From: Tom Lane
Date:
Subject: Re: log_autovacuum