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

Andrew Dunstan <andrew@dunslane.net>

Commit: 0998720d0cf4bf6197d2d8d4caef77dbe03a0e18
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2007-06-14T01:49:39Z
Releases: 8.2.5
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