diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2021-10-18 14:30:00 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2021-10-18 14:46:01 +0300 |
commit | c4649cce39a41b27db874e75ddd47adaec1b0ea4 (patch) | |
tree | 5a05b522576450ef566ecbb35938152098e1078f /src/include/nodes/execnodes.h | |
parent | 409f9ca4471331be0f77b665ff3a1836a41de5b3 (diff) |
Refactor LogicalTapeSet/LogicalTape interface.
All the tape functions, like LogicalTapeRead and LogicalTapeWrite, now
take a LogicalTape as argument, instead of LogicalTapeSet+tape number.
You can create any number of LogicalTapes in a single LogicalTapeSet, and
you don't need to decide the number upfront, when you create the tape set.
This makes the tape management in hash agg spilling in nodeAgg.c simpler.
Discussion: https://www.postgresql.org/message-id/420a0ec7-602c-d406-1e75-1ef7ddc58d83%40iki.fi
Reviewed-by: Peter Geoghegan, Zhihong Yu, John Naylor
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r-- | src/include/nodes/execnodes.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 37cb4f3d59a..2e8cbee69ff 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -41,6 +41,7 @@ struct ExprContext; struct RangeTblEntry; /* avoid including parsenodes.h here */ struct ExprEvalStep; /* avoid including execExpr.h everywhere */ struct CopyMultiInsertBuffer; +struct LogicalTapeSet; /* ---------------- @@ -2316,7 +2317,7 @@ typedef struct AggState bool table_filled; /* hash table filled yet? */ int num_hashes; MemoryContext hash_metacxt; /* memory for hash table itself */ - struct HashTapeInfo *hash_tapeinfo; /* metadata for spill tapes */ + struct LogicalTapeSet *hash_tapeset; /* tape set for hash spill tapes */ struct HashAggSpill *hash_spills; /* HashAggSpill for each grouping set, * exists only during first pass */ TupleTableSlot *hash_spill_rslot; /* for reading spill files */ |