pgsql: Revert "Improve accounting for memory used by shared hash tables

From: Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Revert "Improve accounting for memory used by shared hash tables
Date: 2025-04-04 02:50:11
Message-ID: E1u0X8F-002YiJ-1v@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Revert "Improve accounting for memory used by shared hash tables"

This reverts commit f5930f9a98ea65d659d41600a138e608988ad122.

This broke the expansion of private hash tables, which reallocates the
directory. But that's impossible when it's allocated together with the
other fields, and dir_realloc() failed with BogusFree. Clearly, this
needs rethinking.

Discussion: https://postgr.es/m/CAApHDvriCiNkm=v521AP6PKPfyWkJ++jqZ9eqX4cXnhxLv8w-A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1aff1dc8dfa7584ddbc695e1aae0f767db66326f

Modified Files
--------------
src/backend/storage/ipc/shmem.c | 4 +-
src/backend/utils/hash/dynahash.c | 281 +++++++++-----------------------------
src/include/utils/hsearch.h | 3 +-
3 files changed, 66 insertions(+), 222 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tomas Vondra 2025-04-04 02:58:10 Re: pgsql: Improve accounting for memory used by shared hash tables
Previous Message Amit Langote 2025-04-04 02:34:48 pgsql: Make derived clause lookup in EquivalenceClass more efficient