Implement a chunking protocol for writes to the syslogger pipe, with messages

Andrew Dunstan <andrew@dunslane.net>

Commit: 1103beb52a216a3ae1d9d62a91a0adb0d9f60b90
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2007-06-14T01:50:14Z
Releases: 8.1.10
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

Files

PathChange+/−
src/backend/postmaster/syslogger.c modified +255 −13
src/backend/utils/error/elog.c modified +41 −3
src/include/postmaster/syslogger.h modified +49 −1