Azure PostgreSQL checkpoint logging is disabled

Use Azure PostgreSQL checkpoint logs to investigate write load and performance problems.

Description

On Flexible Server, log_checkpoints records checkpoint and restartpoint durations and the number of buffers written. Checkpoints still run when logging is off.

Potential impact

Without these records, a disk I/O spike is harder to relate to the writes happening when responses slowed.

Remediation

Set value to on in the target server’s log_checkpoints configuration. After the next checkpoint completes, find its duration and buffer count at the log destination. Retain the records for the investigation period and restrict reader access. Configure query auditing separately if needed.

Examples

The first excerpt targets retired Single Server. In the second, MyDBServer1 is a separately prepared Flexible Server. The excerpts omit the parent declarations and data migration.

Before

bicep
resource MyDBServer1_log_checkpoints 'Microsoft.DBforPostgreSQL/servers/configurations@2017-12-01' = {
  parent: MyDBServer1
  name: 'log_checkpoints'
  properties: {
    value: 'off'
  }
}

After

bicep
resource MyDBServer1_log_checkpoints 'Microsoft.DBforPostgreSQL/flexibleServers/configurations@2024-08-01' = {
  parent: MyDBServer1
  name: 'log_checkpoints'
  properties: {
    source: 'user-override'
    value: 'on'
  }
}

References