From: Heikki Linnakangas Date: Sat, 4 Apr 2026 08:46:11 +0000 (+0300) Subject: Add missing shmem size estimate for fast-path locking struct X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=c06443063f01b0996a16dea77462ac6b31eb181d;p=thirdparty%2Fpostgresql.git Add missing shmem size estimate for fast-path locking struct It's been missing ever since fast-path locking was introduced. It's a small discrepancy, about 4 kB, but let's be tidy. This doesn't seem worth backpatching, however; in stable branches we were less precise about the estimates and e.g. added a 10% margin to the hash table estimates, which is usually much bigger than this discrepancy. --- diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index 9dae407981f..798c453ab38 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -3775,6 +3775,9 @@ LockManagerShmemSize(void) max_table_size *= 2; size = add_size(size, hash_estimate_size(max_table_size, sizeof(PROCLOCK))); + /* fast-path structures */ + size = add_size(size, sizeof(FastPathStrongRelationLockData)); + return size; }