Re: [HACKERS] Explicit relation name in VACUUM VERBOSE log

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] Explicit relation name in VACUUM VERBOSE log
Дата
Msg-id 20170815021444.ghejfveddgk5h6vs@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: [HACKERS] Explicit relation name in VACUUM VERBOSE log  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [HACKERS] Explicit relation name in VACUUM VERBOSE log  (Michael Paquier <michael.paquier@gmail.com>)
Re: [HACKERS] Explicit relation name in VACUUM VERBOSE log  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
Michael Paquier wrote:
> On Tue, Aug 15, 2017 at 10:27 AM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> > Currently vacuum verbose outputs vacuum logs as follows. The first log
> > message INFO: vacuuming "public.hoge" writes the relation name with
> > schema name but subsequent vacuum logs output only relation name
> > without schema name. I've encountered a situation where there are some
> > same name tables in different schemas and the concurrent vacuum logs
> > made me hard to distinguish tables. Is there any reasons why we don't
> > write an explicit name in vacuum verbose logs? If not, can we add
> > schema names to be more clearly?
> 
> That's definitely a good idea. lazy_vacuum_rel() uses in one place
> dbname.schname.relname for autovacuum. This is an inconsistent bit,
> but that's not really worth changing and there is always
> log_line_prefix = '%d'. 

Worth keeping in mind that INFO messages do not normally go to the
server log, but rather only to the client.  If it were a problem at the
server side, you could also suggest adding %p to the log line prefix to
disambiguate.  Maybe the scenario where this is a real problem is
vacuumdb -j ...

> In vacuum_rel()@vacuum.c, there are a couple of logs that could be
> improved as well with the schema name.

I agree that there's a lot of room for improvement there.  If I'm
allowed some scope creep, I'd say that gathering detailed vacuum info
from both autovacuum and user-invoked vacuum in a central place would be
very welcome.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] What users can do with custom ICU collations inPostgres 10
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] What users can do with custom ICU collations inPostgres 10