Skip to main content

How recommendations work

Each recommendation on the Tuning tab follows a consistent structure and is backed by observable evidence from your database.

Recommendation shape

FieldDescription
paramPostgreSQL parameter name (e.g. work_mem, max_wal_size)
categoryGrouping: Memory, WAL, Connections, Autovacuum, etc.
currentCurrent value from pg_settings
recommendedSuggested value
actionINCREASE, DECREASE, SET, NO_ACTION, or INSIGHT
priorityCRITICAL, HIGH, MEDIUM, or LOW
reasonHuman-readable explanation with the decision logic
requires_restartWhether the change needs a PostgreSQL restart
sqlALTER SYSTEM SET command (or avn service update for Aiven)
rollback_sqlCommand to revert to the previous value
evidenceParameter-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.