Re: Patch review for logging hooks (CF 2012-01) - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Patch review for logging hooks (CF 2012-01)
Date
Msg-id CAHGQGwH+WeXA97mVBTOxbmo0-yXOPBOEkVe5K8vrUw9LAmhFSQ@mail.gmail.com
Whole thread Raw
In response to Patch review for logging hooks (CF 2012-01)  (Marti Raudsepp <marti@juffo.org>)
Responses Re: Patch review for logging hooks (CF 2012-01)
List 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 by date:

Previous
From: Robert Haas
Date:
Subject: Re: psql \timing vs failed statements
Next
From: Jim Nasby
Date:
Subject: Re: Vacuum rate limit in KBps