| From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Remove 10% safety margin from lock manager hash table estimates |
| Date: | 2026-04-03 17:32:04 |
| Message-ID: | E1w8iNH-002maS-15@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Remove 10% safety margin from lock manager hash table estimates
As the comment says, the hash table sizes are just estimates, but that
doesn't mean we need a "safety margin" here. hash_estimate_size()
estimates the needed size in bytes pretty accurately for the given
number of elements, so if we wanted room for more elements in the
table, we should just use larger max_table_size in the
hash_estimate_size() call.
Reviewed-by: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Reviewed-by: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/e07be2ba-856b-4ff5-8313-8b58b6b4e4d0@iki.fi
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3e854d2ff1a6ee1d9e0e01319ef41eb466f06c23
Modified Files
--------------
src/backend/storage/lmgr/lock.c | 5 -----
1 file changed, 5 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2026-04-03 19:03:38 | pgsql: Refactor relation_needs_vacanalyze(). |
| Previous Message | Amit Langote | 2026-04-03 06:44:24 | Re: pgsql: Optimize fast-path FK checks with batched index probes |