mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
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
This commit is contained in:
@ -2882,7 +2882,7 @@ hashagg_tapeinfo_init(AggState *aggstate)
|
||||
HashTapeInfo *tapeinfo = palloc(sizeof(HashTapeInfo));
|
||||
int init_tapes = 16; /* expanded dynamically */
|
||||
|
||||
tapeinfo->tapeset = LogicalTapeSetCreate(init_tapes, NULL, NULL, -1);
|
||||
tapeinfo->tapeset = LogicalTapeSetCreate(init_tapes, true, NULL, NULL, -1);
|
||||
tapeinfo->ntapes = init_tapes;
|
||||
tapeinfo->nfreetapes = init_tapes;
|
||||
tapeinfo->freetapes_alloc = init_tapes;
|
||||
|
Reference in New Issue
Block a user