Re: Logging pg_autovacuum

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Logging pg_autovacuum
Date: 2006-04-27 18:32:39
Message-ID: 200604271832.k3RIWdp23031@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Matthew T. O'Connor wrote:
> I think there are two things people typically want to know from the logs:
> 1) Is autovacuum running
> 2) Did autovacuum take action (issue a VACUUM or ANALYZE)
>
> I don't think we need mention the name of each and every database we
> touch, we can, but it should be at a lower level like DEBUG1 or something.

OK, that part is done.

> I don't know what logging level these thing should go at, but I for one
> would like them to be fairly high easy to get to, perhaps NOTICE?

Interesting idea. I had forgotten that for server messages, LOG is at
the top, and ERROR, NOTICE, etc are below it. We could make them
NOTICE, but then all user NOTICE messages appear in the logs too. Yuck.

Do we want to LOG everytime autovacuum does something? Is that going to
fill up the logs worse than the per-database line?

The real issue is that we give users zero control over what autovacuum
logs, leading to the TODO item. I guess the question is until the TODO
item is done, what do we want to do?

How do people like the idea of having this in postgresql.conf:

autovacuum_set = 'set log_min_messages = ''error'''

and set autovacuum to output notice/info/error messages as desired by
the administrator? This shouldn't be too hard to do, and it is very
flexible.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message User H-saito 2006-04-27 18:38:41 psqlodbc - psqlodbc: adds to a document.
Previous Message Tom Lane 2006-04-27 18:24:35 pgsql: Fix ltreeparentsel so it actually works ...

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2006-04-27 18:40:57 Re: Logging pg_autovacuum
Previous Message Matthew T. O'Connor 2006-04-27 18:03:56 Re: Logging pg_autovacuum