Accommodate very large dshash tables.
authorNathan Bossart <nathan@postgresql.org>
Tue, 17 Dec 2024 21:24:45 +0000 (15:24 -0600)
committerNathan Bossart <nathan@postgresql.org>
Tue, 17 Dec 2024 21:24:45 +0000 (15:24 -0600)
commit2a74023221f9b9e484611581542c14fc6ef6d239
treea048ad4f99dc736696adfc306a759498ce9c6a9e
parent3231cb57d886450f0251f64e440ac51d4675bef2
Accommodate very large dshash tables.

If a dshash table grows very large (e.g., the dshash table for
cumulative statistics when there are millions of tables), resizing
it may fail with an error like:

ERROR: invalid DSA memory alloc request size 1073741824

To fix, permit dshash resizing to allocate more than 1 GB by
providing the DSA_ALLOC_HUGE flag.

Reported-by: Andreas Scherbaum
Author: Matthias van de Meent
Reviewed-by: Cédric Villemain, Michael Paquier, Andres Freund
Discussion: https://postgr.es/m/80a12d59-0d5e-4c54-866c-e69cd6536471%40pgug.de
Backpatch-through: 13
src/backend/lib/dshash.c