Refactor LogicalTapeSet/LogicalTape interface.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 18 Oct 2021 11:30:00 +0000 (14:30 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 18 Oct 2021 11:46:01 +0000 (14:46 +0300)
commitc4649cce39a41b27db874e75ddd47adaec1b0ea4
tree5a05b522576450ef566ecbb35938152098e1078f
parent409f9ca4471331be0f77b665ff3a1836a41de5b3
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
src/backend/executor/nodeAgg.c
src/backend/utils/sort/logtape.c
src/backend/utils/sort/tuplesort.c
src/include/nodes/execnodes.h
src/include/utils/logtape.h