On Wed, Jan 18, 2012 at 2:35 AM, Marti Raudsepp <ma...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers