Audit settings
audit_settingsAudits PostgreSQL configuration for dangerous settings (fsync=off, autovacuum=off) and cross-setting mismatches. Optionally checks RAM ratios for shared_buffers and effective_cache_size when total_ram_mb is provided.
Instructions
Sanity-sweep postgresql.conf via pg_settings. Flags dangerous toggles (fsync=off, full_page_writes=off, autovacuum=off, synchronous_commit=off), cross-setting issues (maintenance_work_mem < work_mem, tiny shared_buffers, low checkpoint_completion_target), and — when total_ram_mb is supplied — RAM-relative ratios for shared_buffers / effective_cache_size (PostgreSQL can't see host RAM itself). Pure read. Returns an object with ram_aware (bool), examined_settings (list), detail, and findings (tripped rules only — each with code, setting, current, status, suggestion).
Example: audit_settings(total_ram_mb=16384)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. | |
| total_ram_mb | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | ||
| findings | Yes | ||
| ram_aware | Yes | ||
| examined_settings | Yes |