Обсуждение: Re: [GENERAL] Autovacuum Logging

Поиск
Список
Период
Сортировка

Re: [GENERAL] Autovacuum Logging

От
Bruce Momjian
Дата:
I am thinking, what do we want to show by default about autovacuum in
the server logs.  What if we output a line the first time autovacuum
runs successfully on server start?

---------------------------------------------------------------------------

Bruce Momjian wrote:
> Robert Treat wrote:
> > On Thursday 27 April 2006 11:59, Bruce Momjian wrote:
> > > Well, one problem now is that everytime pg_autovacuum opens a database,
> > > a message is placed in the logs:
> > >
> > >     LOG:  autovacuum: processing database "test"
> > >     LOG:  autovacuum: processing database "test"
> > >     LOG:  autovacuum: processing database "test"
> > >     LOG:  autovacuum: processing database "test"
> > >
> > > This is certainly not desirable.  I changed the message to DEBUG1 for
> > > 8.2 with the attached patch.  
> > 
> > IMHO this is less optimal, since the default installation will provide no way 
> > for users to verify that autovacuum is running.  Currently we can direct them 
> > to look in thier log output, this way we would have to tell them to crank up 
> > logging to DEBUG1 and then look, which will of course contain a whole lot of 
> > other chatter at that level. 
> 
> Someone is working on it.
> 
> > The best solution I have seen so far is the idea of a GUC to control 
> > autovacuums chatter level.  I hope we get that becuase the above will be a 
> > regression imho. 
> 
> The purpose of the logs is not to show something _working_, but to
> report significant events.  Frankly, even with the GUC, to see it is
> working you are still going to fill up the logs with activity.
> 
> What do people want to know? ---  that autovacuum is running, or how
> often.  If it is the former, we can print something on server startup.
> 
> We don't even really log checkpoints, so logging every autovacuum seems
> strange.


--  Bruce Momjian   http://candle.pha.pa.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: [GENERAL] Autovacuum Logging

От
Robert Treat
Дата:
On Friday 28 April 2006 19:06, Bruce Momjian wrote:
> I am thinking, what do we want to show by default about autovacuum in
> the server logs.  What if we output a line the first time autovacuum
> runs successfully on server start?
>

If Larry can do the work of getting details added into the stats views, I'm 
comfortable just setting all of the logging to debug1 and leaving it at that. 
I still could see the idea of having a guc for an autovacuum specific log 
control; I could see an admin who first enables autovacuum might want to log 
all its activity for some period of time; but the angle of "need to verify it 
is turned on" goes away with the stats info. 

-- 
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


Re: [GENERAL] Autovacuum Logging

От
Tom Lane
Дата:
Robert Treat <xzilla@users.sourceforge.net> writes:
> If Larry can do the work of getting details added into the stats views, I'm 
> comfortable just setting all of the logging to debug1 and leaving it at that.
> I still could see the idea of having a guc for an autovacuum specific log 
> control; I could see an admin who first enables autovacuum might want to log 
> all its activity for some period of time; but the angle of "need to verify it
> is turned on" goes away with the stats info. 

Yeah, there's a lot to be said for that point.  I was about to object
that you might not have stats turned on, but if you're running autovac,
I guess you do...

So let's temporarily forget the idea of complicating autovac's logging
code, and instead see if the stats approach will solve the problem.
        regards, tom lane