pgsql: logtape.c: do not preallocate for tapes when sorting - Mailing list pgsql-committers

From Jeff Davis
Subject pgsql: logtape.c: do not preallocate for tapes when sorting
Date
Msg-id E1kGtLP-0006qM-5G@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/93106d71a18afdda2b9bf6e6b8e6c7f9cea2d0ef

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(-)


pgsql-committers by date:

Previous
From: Jeff Davis
Date:
Subject: pgsql: logtape.c: do not preallocate for tapes when sorting
Next
From: Amit Kapila
Date:
Subject: pgsql: Remove unused function declaration in logicalproto.h.