diff options
author | Jeff Davis <jdavis@postgresql.org> | 2020-03-06 17:28:53 -0800 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2020-03-09 10:40:02 -0700 |
commit | 24d85952a57b16090ca8ad9cf800fbdd9ddd104f (patch) | |
tree | 7a4d0244ac49eea79d221c6287f097e64e6dec5c /src/include/utils/logtape.h | |
parent | 17d3fcdc39577b1e43624392c25e5384da42e522 (diff) | |
download | postgresql-24d85952a57b16090ca8ad9cf800fbdd9ddd104f.tar.gz postgresql-24d85952a57b16090ca8ad9cf800fbdd9ddd104f.zip |
Introduce LogicalTapeSetExtend().
Increases the number of tapes in a logical tape set. This will be
important for disk-based hash aggregation, because the maximum number
of tapes is not known ahead of time.
While discussing this change, it was observed to regress the
performance of Sort for at least one test case. The performance
regression was because some versions of GCC switch to an inlined
version of memcpy() in LogicalTapeWrite() after this change. No
performance regression for clang was observed.
Because the regression is due to an arbitrary decision by the
compiler, I decided it shouldn't hold up this change. If it needs to
be fixed, we can find a workaround.
Author: Adam Lee, Jeff Davis
Discussion: https://postgr.es/m/e54bfec11c59689890f277722aaaabd05f78e22c.camel%40j-davis.com
Diffstat (limited to 'src/include/utils/logtape.h')
-rw-r--r-- | src/include/utils/logtape.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/logtape.h b/src/include/utils/logtape.h index 695d2c00ee4..39a99174afe 100644 --- a/src/include/utils/logtape.h +++ b/src/include/utils/logtape.h @@ -67,6 +67,7 @@ extern void LogicalTapeRewindForRead(LogicalTapeSet *lts, int tapenum, extern void LogicalTapeRewindForWrite(LogicalTapeSet *lts, int tapenum); extern void LogicalTapeFreeze(LogicalTapeSet *lts, int tapenum, TapeShare *share); +extern void LogicalTapeSetExtend(LogicalTapeSet *lts, int nAdditional); extern size_t LogicalTapeBackspace(LogicalTapeSet *lts, int tapenum, size_t size); extern void LogicalTapeSeek(LogicalTapeSet *lts, int tapenum, |