]> granicus.if.org Git - postgresql/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:02 +0000 (22:18 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 8 Jul 2008 22:18:02 +0000 (22:18 +0000)
commit33da69f5b507413099cd158ca4b2cf6c65cb17b4
tree75fb79cf000858e12dd0bc700c517f31f1cc087c
parent848268c58a030e67b98125780f62391d8b0a3fc6
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