Expand description
PostgreSQL tuning value computation.
Produces the settings a PostgreSQL server on a Tamanu host should run with, replicating pgtune’s values for an OLTP workload on SSD storage, adjusted for a resource budget that reserves headroom for the co-located application, reverse proxy, and backup tooling.
The same budget and expected values back the doctor’s tuning health check, so a host tuned from here passes that check.
Modules§
- conf_
block - Rendering and splicing of the managed tuning block in
postgresql.conf.
Structs§
- Budget
- The budgeted resources every tuning value is derived from.
- Host
Resources - Raw host resources, before any budgeting.
- Setting
- A single
key = valuetuning directive. - Tune
Inputs - Everything needed to compute a full tuning set.
Enums§
- Platform
- The host operating system, which changes a handful of tuning values.
Functions§
- budget
- Compute the resource budget for a host.
- compute
- Compute the full tuning set, in canonical order.
- expected_
effective_ cache_ kib - Expected
effective_cache_size, in kibibytes, for a budget. - expected_
maintenance_ kib - Expected
maintenance_work_mem, in kibibytes, for a budget. - expected_
shared_ buffers_ kib - Expected
shared_buffers, in kibibytes, for a budget.