Fix performance bug in write_syslog(): the code to preferentially break the

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 20c20dfeec4420d0c63ae29c950281cb70f64c39
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-07-08T22:18:18Z
Releases: 7.4.22
Fix performance bug in write_syslog(): the code to preferentially break the
log message at newlines cost O(N^2) for very long messages with few or no
newlines.  For messages in the megabyte range this became the dominant cost.
Per gripe from Achilleas Mantzios.

Patch all the way back, since this is a safe change with no portability
risks.  I am also thinking of increasing PG_SYSLOG_LIMIT, but that should
be done separately.

Files

PathChange+/−
src/backend/utils/error/elog.c modified +19 −12