pgsql: Fix performance bug in write_syslog(): the code to preferentially - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix performance bug in write_syslog(): the code to preferentially
Date
Msg-id 20080708221747.AF477754857@cvs.postgresql.org
Whole thread Raw
List 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_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/error:
        elog.c (r1.201 -> r1.201.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/error/elog.c?r1=1.201&r2=1.201.2.1)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix performance bug in write_syslog(): the code to preferentially
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix performance bug in write_syslog(): the code to preferentially