Re: Patch review for logging hooks (CF 2012-01)

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Patch review for logging hooks (CF 2012-01)
Дата
Msg-id CAHGQGwH+WeXA97mVBTOxbmo0-yXOPBOEkVe5K8vrUw9LAmhFSQ@mail.gmail.com
обсуждение исходный текст
Ответ на Patch review for logging hooks (CF 2012-01)  (Marti Raudsepp <marti@juffo.org>)
Ответы Re: Patch review for logging hooks (CF 2012-01)  (Martin Pihlak <martin.pihlak@gmail.com>)
Список pgsql-hackers
On Wed, Jan 18, 2012 at 2:35 AM, Marti Raudsepp <marti@juffo.org> wrote:
>> Are there corner cases the author has failed to consider?

The hook can be executed by various processes since it's in
EmitErrorReport(). OTOH, log messages are written to the log
file by one process like syslogger (if you use csvlog or stderr)
or syslog process (if you use syslog). So ISTM that there is no
guarantee that the order of log messages processed by the
hook is same as that of messages written to the log file. For
example, imagine the case where two backends call EmitErrorReport()
at the same time. Is this OK? If not, the hook might need to be
in syslogger.

EmitErrorReport() can be called before shared library like Martin's
pg_logforward is preloaded. Which means that the hook may miss
some log messages. Is this OK?

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: psql \timing vs failed statements
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Vacuum rate limit in KBps