diff options
| author | Tom Lane | 2006-03-07 19:06:50 +0000 |
|---|---|---|
| committer | Tom Lane | 2006-03-07 19:06:50 +0000 |
| commit | 8db05ba411ecd3ce2cb0cb7c78fec87658e1a4ab (patch) | |
| tree | 7e0fd7aaff03dcd83ef3e4ac0232ae57c268f628 /src/include | |
| parent | e6107da53c93dc188e257d72c3412510d2584093 (diff) | |
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.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/utils/logtape.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/logtape.h b/src/include/utils/logtape.h index 3791f03e9e3..7cd3db37774 100644 --- a/src/include/utils/logtape.h +++ b/src/include/utils/logtape.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/logtape.h,v 1.14 2006/03/05 15:59:07 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/logtape.h,v 1.15 2006/03/07 19:06:50 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -26,6 +26,7 @@ typedef struct LogicalTapeSet LogicalTapeSet; extern LogicalTapeSet *LogicalTapeSetCreate(int ntapes); extern void LogicalTapeSetClose(LogicalTapeSet *lts); +extern void LogicalTapeSetForgetFreeSpace(LogicalTapeSet *lts); extern size_t LogicalTapeRead(LogicalTapeSet *lts, int tapenum, void *ptr, size_t size); extern void LogicalTapeWrite(LogicalTapeSet *lts, int tapenum, |
