Implement a chunking protocol for writes to the syslogger pipe, with messages
authorAndrew Dunstan <andrew@dunslane.net>
Thu, 14 Jun 2007 01:48:51 +0000 (01:48 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Thu, 14 Jun 2007 01:48:51 +0000 (01:48 +0000)
commitbd2cb9aaa55d2c6760e2722557a8a87b0bd40945
tree2301545dd731540c607b94277e4e52377f82f821
parent320f8205850a2e42b0c6a1e8a7649a7df72b547d
Implement a chunking protocol for writes to the syslogger pipe, with messages
reassembled in the syslogger before writing to the log file. This prevents
partial messages from being written, which mucks up log rotation, and
messages from different backends being interleaved, which causes garbled
logs. Backport as far as 8.0, where the syslogger was introduced.

Tom Lane and Andrew Dunstan
src/backend/postmaster/syslogger.c
src/backend/utils/error/elog.c
src/include/postmaster/syslogger.h