Settings

Recommended GUC Settings

The baseline PostgreSQL configuration MonPG recommends and how to apply it on each provider.

PostgreSQL's defaults favor safety over observability. Most of them have to, given that PG runs everywhere from a Raspberry Pi to a 96-core production cluster. But a handful of changes lift MonPG's data quality dramatically without meaningfully hurting performance, and this page is the list of which ones.

What we recommend

Setting Recommended Restart? Why
track_io_timingonNoPer-block I/O latency. Costs 5-10% CPU on write-heavy workloads. Without this, most I/O metrics report zero.
pg_stat_statements.tracktopNoTrack top-level statements only. all is noisier and rarely useful.
pg_stat_statements.max10000YesThe default 5k evicts long-tail queries on high-QPS clusters, which is exactly the data you want to keep.
pg_stat_statements.track_utilityonNoCaptures VACUUM, CREATE, etc. Useful for the maintenance view.
pg_stat_statements.saveonNoPersists across restart so you don't lose the catalog every reboot.
track_activity_query_size4096YesDefault 1024 truncates long queries; 4096 covers most ORM-generated SQL.
log_min_duration_statement1000NoLogs queries slower than 1s. Feeds Log Insights and Query Advisor.
log_lock_waitsonNoLogs lock waits past deadlock_timeout. Saves you during incident review.
log_checkpointsonNoWAL checkpoint events. Tells you whether checkpoints are timed or forced.
log_autovacuum_min_duration1000NoLogs autovacuum runs over 1 second. The starting point for vacuum tuning.
auto_explain.log_min_duration5000NoPlan-capture threshold (5s). Needs auto_explain in SPL.
auto_explain.log_analyzeonNoIncludes EXPLAIN ANALYZE — the actual numbers, not estimates.
auto_explain.log_buffersonNoBuffer usage in plan output. Lets us spot cold-cache reads.
auto_explain.log_formatjsonNoParsable by the collector. Text format works but JSON is faster.
auto_explain.log_nested_statementsonNoCaptures function/trigger plans, which are usually where the slow query is hiding.

How to apply them

MonPG never modifies your GUCs in hosted onboarding. The Settings → Tuning page surfaces current versus recommended as a read-only diff so you can see exactly what would change. You apply the changes through your provider's config surface when convenient — usually during a planned maintenance window if any of the values need a restart.

The path differs by provider. On AWS RDS or Aurora, it's Parameter Groups; reboot for any restart-bound value. On Azure Flexible Server, the Server parameters blade — and ALTER SYSTEM is blocked, so don't try it. Google Cloud SQL exposes flags (some SPL-bound ones use the cloudsql.* prefix). Heroku has heroku pg:settings for a small set of exposed knobs and the rest are locked. Self-hosted is the easiest case: edit postgresql.conf + SELECT pg_reload_conf(); for reload-capable settings, full restart for postmaster-context ones.