Refactor LogicalTapeSet/LogicalTape interface.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: c4649cce39a41b27db874e75ddd47adaec1b0ea4
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2021-10-18T11:46:01Z
Releases: 15.0
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

Files

PathChange+/−
src/backend/executor/nodeAgg.c modified +49 −138
src/backend/utils/sort/logtape.c modified +184 −272
src/backend/utils/sort/tuplesort.c modified +107 −122
src/include/nodes/execnodes.h modified +2 −1
src/include/utils/logtape.h modified +17 −20

Discussion