Re: log_autovacuum

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: log_autovacuum
Дата
Msg-id 20070417225749.GJ15495@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: log_autovacuum  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: log_autovacuum
Список pgsql-patches
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.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.

Correct.

> 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                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: log_autovacuum
Следующее
От: "FAST PostgreSQL"
Дата:
Сообщение: Re: COPY-able csv log outputs