Repair old performance bug in tuplesort.c/logtape.c. In the case where

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 8db05ba411ecd3ce2cb0cb7c78fec87658e1a4ab
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2006-03-07T19:06:50Z
Releases: 8.2.0
Repair old performance bug in tuplesort.c/logtape.c.  In the case where
we are doing the final merge pass on-the-fly, and not writing the data
back onto a 'tape', the number of free blocks in the tape set will become
large, leading to a lot of time wasted in ltsReleaseBlock().  There is
really no need to track the free blocks anymore in this state, so add a
simple shutoff switch.  Per report from Stefan Kaltenbrunner.

Files

PathChange+/−
src/backend/utils/sort/logtape.c modified +28 −1
src/backend/utils/sort/tuplesort.c modified +35 −15
src/include/utils/logtape.h modified +2 −1