Skip site navigation (1) Skip section navigation (2)

pgsql: Avoid performing encoding conversion on command tag strings

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid performing encoding conversion on command tag strings
Date: 2010-01-30 20:10:11
Message-ID: 20100130201011.9525B7541BA@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Avoid performing encoding conversion on command tag strings during EndCommand.

Since all current and foreseeable future command tags will be pure ASCII,
there is no need to do conversion on them.  This saves a few cycles and also
avoids polluting otherwise-pristine subtransaction memory contexts, which
is the cause of the backend memory leak exhibited in bug #5302.  (Someday
we'll probably want to have a better method of determining whether
subtransaction contexts need to be kept around, but today is not that day.)

Backpatch to 8.0.  The cycle-shaving aspect of this would work in 7.4
too, but without subtransactions the memory-leak aspect doesn't apply,
so it doesn't seem worth touching 7.4.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/backend/tcop:
        dest.c (r1.70 -> r1.70.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/dest.c?r1=1.70&r2=1.70.2.1)

pgsql-committers by date

Next:From: Tom LaneDate: 2010-01-30 20:10:16
Subject: pgsql: Avoid performing encoding conversion on command tag strings
Previous:From: Tom LaneDate: 2010-01-30 20:10:05
Subject: pgsql: Avoid performing encoding conversion on command tag strings

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group