LWLock contention benchmarks in Postgres 18

Measure performance impact from LWLock contention in PostgreSQL 18 as a function of table index count and the max_locks_per_transaction parameter in a synthetic benchmark.


Acceptance Criteria

  • Benchmark measures LWLock contention in PostgreSQL 18 as a function of table index count and max_locks_per_transaction
  • Test matrix covers multiple index counts (e.g., 0, 10, 50, 100 indexes per table) and max_locks_per_transaction values
  • Metrics collected: TPS, latency, wait event distribution, lock contention time
  • Synthetic workload is documented and reproducible

Definition of Done

  • Benchmark scripts are committed and reproducible
  • Results are documented with charts showing contention vs. index count and max_locks_per_transaction
  • Findings include actionable recommendations for tuning
Edited by Nikolay Samokhvalov