Skip to main content

Module pgtune

Module pgtune 

Source
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.
HostResources
Raw host resources, before any budgeting.
Setting
A single key = value tuning directive.
TuneInputs
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.