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

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix performance bug in write_syslog(): the code to preferentially
Date: 2008-07-08 22:18:03
Message-ID: 20080708221803.0BCB9754858@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
pgsql/src/backend/utils/error:
elog.c (r1.167.2.5 -> r1.167.2.6)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/error/elog.c?r1=1.167.2.5&r2=1.167.2.6)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-07-08 22:18:09 pgsql: Fix performance bug in write_syslog(): the code to preferentially
Previous Message Tom Lane 2008-07-08 22:17:55 pgsql: Fix performance bug in write_syslog(): the code to preferentially