postgres-github.git / summary / log / commit / refs

commit    999e9ebb51c920de270e23a5fe929441f073ad55
Author:   Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date:     Fri Apr 03 23:40:24 2026 +0000

    Prevent shared memory hash tables from growing beyond initial size
    
    Set HASH_FIXED_SIZE on all shared memory hash tables, to prevent them
    from growing after the initial allocation. It was always weirdly
    indeterministic that if one hash table used up all the unused shared
    memory, you could not use that space for other things anymore until
    restart. We just got rid of that behavior for the LOCK and PROCLOCK
    tables, but it's similarly weird for all other hash tables.
    
    Increase SHMEM_INDEX_SIZE because we were already above the max size,
    on that one, and it's now a hard limit.
    
    Some callers of ShmemInitHash() still pass HASH_FIXED_SIZE, but that's
    now unnecessary. They should perhaps now be removed, but it doesn't do
    any harm either to pass it.
    
    Reviewed-by: Tomas Vondra <tomas@vondra.me>
    Discussion: https://www.postgresql.org/message-id/01ab1d41-3eda-4705-8bbd-af898f5007f1@iki.fi

[parent: 9ebe1c4f2c7c]