Thread: pgsql: Repair old performance bug in tuplesort.c/logtape.c.

pgsql: Repair old performance bug in tuplesort.c/logtape.c.

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/utils/sort:
        logtape.c (r1.19 -> r1.20)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/sort/logtape.c.diff?r1=1.19&r2=1.20)
        tuplesort.c (r1.62 -> r1.63)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/sort/tuplesort.c.diff?r1=1.62&r2=1.63)
    pgsql/src/include/utils:
        logtape.h (r1.14 -> r1.15)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/logtape.h.diff?r1=1.14&r2=1.15)