]> granicus.if.org Git - postgresql/commit
Avoid performing encoding conversion on command tag strings during EndCommand.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 30 Jan 2010 20:10:05 +0000 (20:10 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 30 Jan 2010 20:10:05 +0000 (20:10 +0000)
commite488941ac5a00308069c6fa5fe5e9bcfe4e3031f
tree6f80a02f760af0931d4f7328fffeda1b0efc3a79
parentacd294e9459fb1e8d41895784bc4e54424f6c40a
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.
src/backend/tcop/dest.c