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

Andrew Dunstan <andrew@dunslane.net>

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