]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix performance bug in write_syslog(): the code to preferentially break the
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 8 Jul 2008 22:18:18 +0000 (22:18 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 8 Jul 2008 22:18:18 +0000 (22:18 +0000)
commit20c20dfeec4420d0c63ae29c950281cb70f64c39
tree97b6d21768c2cb464bc978b8b2ec0322927eba76
parent99772d6465191b360f099d75ace760dc97ec9fcb
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.
src/backend/utils/error/elog.c