Re: Patch review for logging hooks (CF 2012-01)
От | Andrew Dunstan |
---|---|
Тема | Re: Patch review for logging hooks (CF 2012-01) |
Дата | |
Msg-id | 4F16F2FC.3010704@dunslane.net обсуждение исходный текст |
Ответ на | Re: Patch review for logging hooks (CF 2012-01) (Martin Pihlak <martin.pihlak@gmail.com>) |
Ответы |
Re: Patch review for logging hooks (CF 2012-01)
|
Список | pgsql-hackers |
On 01/18/2012 11:12 AM, Martin Pihlak wrote: > On 01/18/2012 03:56 AM, Fujii Masao wrote: >> 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. > For high volume logging I'd avoid going through the syslogger. One > big issue with syslogger is that it creates a choke point - everything > has to pass through it, and if it cannot keep up it starts stalling > the backends. Also, in EmitErrorReport the hook gets to have access > to the actual ErrorData structure -- that makes filtering and looking > at message content much simpler. > > Hmm, interesting. I don't think I've encountered a situation where backends would actually stall. But in any case, I don't think we have to be that deterministic. The only thing that needs to be absolutely guaranteed is that the log messages from a given backend are in order. Some slight fuzz between backends seems acceptable. cheers andrew
В списке pgsql-hackers по дате отправления: