Move memory management away from writetup() and tuplesort_put*()
Alexander Korotkov <akorotkov@postgresql.org>
Move memory management away from writetup() and tuplesort_put*() This commit puts some generic work away from sort-variant-specific function. In particular, tuplesort_put*() now doesn't need to decrease available memory and switch to sort context before calling puttuple_common(). writetup() doesn't need to free SortTuple.tuple and increase available memory. Discussion: https://postgr.es/m/CAPpHfdvjix0Ahx-H3Jp1M2R%2B_74P-zKnGGygx4OWr%3DbUQ8BNdw%40mail.gmail.com Author: Alexander Korotkov Reviewed-by: Pavel Borisov, Maxim Orlov, Matthias van de Meent Reviewed-by: Andres Freund, John Naylor
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/sort/tuplesort.c | modified | +33 −45 |
Discussion
- Custom tuplesorts for extensions 21 messages · 2022-06-23 → 2022-07-27