postgresql/src
Heikki Linnakangas feb03dfecd Remove bogus "safety margin" from predicate.c shmem estimates
The 10% safety margin was copy-pasted from lock.c when the predicate
locking code was originally added. However, we later (commit
7c797e7194) added the HASH_FIXED_SIZE flag to the hash tables, which
means that they cannot actually use the safety margin that we're
calculating for them.

The extra memory was mainly used by the main lock manager, which is
the only shmem hash table of non-trivial size that does not use the
HASH_FIXED_SIZE flag. If we wanted to have more space for the lock
manager, we should reserve it directly in lock.c. After this commit,
the lock manager will just have less memory available than before.

Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>
Discussion: https://www.postgresql.org/message-id/e07be2ba-856b-4ff5-8313-8b58b6b4e4d0@iki.fi
2026-04-03 20:25:57 +03:00
..
backend Remove bogus "safety margin" from predicate.c shmem estimates 2026-04-03 20:25:57 +03:00
bin Further harden tests that might use not-so-compatible tar versions. 2026-04-02 17:21:27 -04:00
common Make implementation of SASLprep compliant for ASCII characters 2026-03-24 08:29:23 +09:00
fe_utils Harden astreamer tar parsing logic against archives it can't handle. 2026-04-02 12:20:36 -04:00
include Optimize fast-path FK checks with batched index probes 2026-04-03 14:33:53 +09:00
interfaces libpq: Allow developers to reimplement libpq-oauth 2026-03-31 11:47:26 -07:00
makefiles meson: Add {perl|python}_includespec to generated Makefile.global 2026-03-18 11:09:14 +01:00
pl Avoid including vacuum.h in tableam.h and heapam.h. 2026-03-31 12:43:52 -05:00
port Harden astreamer tar parsing logic against archives it can't handle. 2026-04-02 12:20:36 -04:00
template Switch the semaphore API on Solaris to unnamed POSIX. 2026-03-14 14:10:32 -04:00
test Optimize fast-path FK checks with batched index probes 2026-04-03 14:33:53 +09:00
timezone Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00
tools Optimize fast-path FK checks with batched index probes 2026-04-03 14:33:53 +09:00
tutorial Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Update Unicode data to Unicode 17.0.0 2026-03-20 08:42:50 +01:00
Makefile.shlib Restore AIX support. 2026-02-23 13:34:22 -05:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
nls-global.mk Fix update-po for the PGXS case 2025-10-16 20:21:05 +02:00