Re: Unifying VACUUM VERBOSE and log_autovacuum_min_duration output

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Unifying VACUUM VERBOSE and log_autovacuum_min_duration output
Дата
Msg-id CAH2-WznWzpe-HNMsrCnc9kxuHB2aW2w62L75fxFF+UFYUDNYrg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Unifying VACUUM VERBOSE and log_autovacuum_min_duration output  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Sat, Dec 11, 2021 at 2:52 PM Andres Freund <andres@anarazel.de> wrote:
> I feel one, or both, must be missing something here. My point was that you
> said upthread that the patch doesn't change DEBUG2/non-verbose logging for
> most messages. But the fact that those messages are only emitted inside and if
> (verbose) seems to contradict that?

That is technically true, but it's not true in any practical sense.
Yes, there are 2 distinct ereports() per vacuumlazy.c call for VACUUM
VERBOSE (i.e. 2 per relation processed by the command). Yes, only the
second one is actually "shared" with log_autovacuum_* (the first one
is just shows that we're processing a new relation, with the
aggressiveness). But that's not very significant.

The only reason that I did it that way is because there is an
expectation that plain "VACUUM VERBOSE" (i.e. no target relation
specified) will work as a rudimentary progress indicator at the heap
rel granularity -- the VACUUM VERBOSE docs pretty much say so. As I
pointed out before, the docs for VERBOSE that appear in vacuum.sgml
say:

"When VERBOSE is specified, VACUUM emits progress messages to indicate
which table is currently being processed. Various statistics about the
tables are printed as well."

Having 2 ereports (not just 1) isn't essential, but it seems useful
because it makes the new VACUUM VERBOSE continue to work like this.
But without any of the downsides that go with seeing way too much
detail, moment to moment.

-- 
Peter Geoghegan



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Unifying VACUUM VERBOSE and log_autovacuum_min_duration output
Следующее
От: Thomas Munro
Дата:
Сообщение: Windows now has fdatasync()