error handling in logging hooks

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема error handling in logging hooks
Дата
Msg-id 1344612112.13818.6.camel@vanquo.pezone.net
обсуждение исходный текст
Ответы Re: error handling in logging hooks  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
What is the intended way to handle errors in the new logging hook?  For
example, errors in establishing a connection to wherever a hook wants to
send things.

The reference implementation pg_logforward just uses fprintf(stderr) to
communicate its own errors, which doesn't seem ideal.

Calling elog(ERROR) in the logging hook causes death by recursion.  It
seems that some of the recursion protection infrastructure of elog.c
isn't exposed to the public, so it's not obvious how to use it.

Should logging hooks handle this themselves (could be complicated,
multiple hooks etc.), or should we try to build this into elog.c where
the hooks are called?





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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: bug of pg_trgm?
Следующее
От: Greg Stark
Дата:
Сообщение: Re: WIP patch for consolidating misplaced-aggregate checks