Verify that Server Parameter 'log_checkpoints' is set to 'ON' for PostgreSQL Database Server
Why this matters
Checkpoints are critical events in PostgreSQL that flush in-memory data to disk and update the database’s write-ahead log. Enabling log_checkpoints
ensures that each checkpoint is recorded in the query and error logs, providing essential visibility into the database’s internal operations.
Without this setting, issues related to checkpoint frequency, disk I/O, or performance bottlenecks can go undetected. Logging checkpoints supports effective monitoring, tuning, and troubleshooting of PostgreSQL systems.
What this check does
This Auto Check verifies whether the PostgreSQL server parameter log_checkpoints
is enabled.
Check Logic:
Passes if:
log_checkpoints
is explicitly set to on
.
Fails if:
log_checkpoints
is unset, null, or set to off
.
Applies to:
- Azure PostgreSQL Single Server
- Azure PostgreSQL Flexible Server
- The check retrieves the parameter status through Azure’s configuration API and matches it against the expected string value
on
.
How to fix it
Use one of the following methods to enable log_checkpoints
.
Azure Portal:
- Navigate to Azure Database for PostgreSQL servers.
- Select your server and open Server parameters.
- Search for
log_checkpoints
. - Set the value to ON.
- Click Save.
Azure CLI:
az postgres server configuration set \
--resource-group <resourceGroupName> \
--server-name <serverName> \
--name log_checkpoints \
--value on
PowerShell:
Update-AzPostgreSqlConfiguration `
-ResourceGroupName "<ResourceGroupName>" `
-ServerName "<ServerName>" `
-Name "log_checkpoints" `
-Value "on"
Replace placeholder values with those from your actual Azure configuration.
Exceptions
No exceptions are recommended. Logging checkpoints is a low-overhead setting that supports critical operational diagnostics. If disabled due to log volume concerns, document the decision and implement compensating visibility measures.