How recommendations work
Each recommendation on the Tuning tab follows a consistent structure and is backed by observable evidence from your database.
Recommendation shape
| Field | Description |
|---|---|
| param | PostgreSQL parameter name (e.g. work_mem, max_wal_size) |
| category | Grouping: Memory, WAL, Connections, Autovacuum, etc. |
| current | Current value from pg_settings |
| recommended | Suggested value |
| action | INCREASE, DECREASE, SET, NO_ACTION, or INSIGHT |
| priority | CRITICAL, HIGH, MEDIUM, or LOW |
| reason | Human-readable explanation with the decision logic |
| requires_restart | Whether the change needs a PostgreSQL restart |
| sql | ALTER SYSTEM SET command (or avn service update for Aiven) |
| rollback_sql | Command to revert to the previous value |
| evidence | Parameter-specific metrics that drove the decision |
When recommended == current, the action is normalized to NO_ACTION and priority to LOW. These are shown in a collapsed "Show healthy" section.
Confidence scoring
Each recommendation carries a confidence level (LOW, MEDIUM, HIGH) based on the quality of available signals. For example, work_mem confidence drops when stats have been recently reset or when the server is idle (few active backends to observe).
Evidence panels
Click "Why?" on any recommendation to expand the evidence panel. This shows the important inputs behind the decision: pressure signals, observed peaks, sample quality, caveats, and rollback context. The panel is designed to explain why a recommendation exists without exposing the full internal scoring system.
Provider awareness
On Aiven, parameters that can be changed via the Aiven Console or CLI show a "Copy CLI" button with an avn service update command. Parameters that Aiven manages internally show a "Service Managed" badge and are dimmed. On all other providers, the standard ALTER SYSTEM SET + SELECT pg_reload_conf() pattern is used.
Per-table ALTER TABLE DDL (fillfactor, autovacuum scale factors) works on all providers including Aiven.
Recommendation history
When you copy a recommendation's SQL, it is recorded in localStorage. The "Applied Changes" section at the bottom of the Tuning tab shows your last 5 applied recommendations per instance.
Freshness
Tuning recommendations use live workload inputs. pocketPG avoids serving stale recommendation decisions when recent WAL, connection, or workload signals have changed.