| From: | David Rowley <drowley(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix misleading comment in tuplesort.c |
| Date: | 2025-12-09 23:01:53 |
| Message-ID: | E1vT6iO-003hT9-2F@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix misleading comment in tuplesort.c
A comment in tuplesort.c was claiming that the code was defining
INITIAL_MEMTUPSIZE so that it *does not* exceed
ALLOCSET_SEPARATE_THRESHOLD, but the code actually ensures that we
purposefully *do* exceed ALLOCSET_SEPARATE_THRESHOLD for the initial
allocation of the tuples array, as per reasons detailed in the
commentary of grow_memtuples().
Also, there's not much need to repeat the mention about
ALLOCSET_SEPARATE_THRESHOLD in each location where INITIAL_MEMTUPSIZE is
used, so remove those comments.
Author: ChangAo Chen <cca5507(at)qq(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Reviewed-by: David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Discussion: https://postgr.es/m/tencent_6FA14F85D6B5B5291532D6789E07F4765C08%40qq.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f275afc997d77ada991307d22703b08f1dedef13
Modified Files
--------------
src/backend/utils/sort/tuplesort.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2025-12-09 23:04:31 | Re: pgsql: injection_points: Remove portions related to custom pgstats |
| Previous Message | Michael Paquier | 2025-12-09 22:56:36 | Re: pgsql: injection_points: Remove portions related to custom pgstats |