Thread: pgsql: logtape.c: do not preallocate for tapes when sorting

pgsql: logtape.c: do not preallocate for tapes when sorting

From
Jeff Davis
Date:
logtape.c: do not preallocate for tapes when sorting

The preallocation logic is only useful for HashAgg, so disable it when
sorting.

Also, adjust an out-of-date comment.

Reviewed-by: Peter Geoghegan
Discussion: https://postgr.es/m/CAH2-Wzn_o7tE2+hRVvwSFghRb75AJ5g-nqGzDUqLYMexjOAe=g@mail.gmail.com
Backpatch-through: 13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/07589649639410032df281e98469db88a0b86271

Modified Files
--------------
src/backend/executor/nodeAgg.c     |  2 +-
src/backend/utils/sort/logtape.c   | 38 +++++++++++++++++++++++++-------------
src/backend/utils/sort/tuplesort.c |  7 ++++---
src/include/utils/logtape.h        |  3 ++-
4 files changed, 32 insertions(+), 18 deletions(-)