PostgreSQL Database configuration ‘log_checkpoints’ should be on¶
Description¶
Enabling log_checkpoints
helps the PostgreSQL Database to Log each checkpoint
which in turn generates query and error logs. However, access to transaction logs is not supported. Query and error logs can be used to identify, troubleshoot, and repair configuration errors and sub-optimal performance.
Remediation Steps¶
Azure Portal¶
Navigate to Azure Database for PostgreSQL servers.
Select the PostgreSQL server.
In the left navigation, select Server parameters.
In
log_checkpoints
, click ON.Click Save.
Azure CLI¶
To enable
log_checkpoints
:
az postgres server configuration set --resource-group <resourceGroupName> --server-name <serverName> --name log_checkpoints --value on
Azure Resource Manager¶
Ensure that a Microsoft.DBforPostgreSQL/servers/configurations resource contains the following:
{
"name": "log_checkpoints",
"properties": {
"value": "on"
}
}
Example Configuration¶
{
"type": "Microsoft.DBforPostgreSQL/servers/configurations",
"apiVersion": "2017-12-01",
"name": "log_checkpoints",
"properties": {
"value": "on"
}
# other required fields here
}
Terraform¶
Ensure that an azurerm_postgresql_configuration contains the following:
name
= “log_checkpoints”value
= “on”
Example Configuration¶
resource "azurerm_postgresql_configuration" "example" {
name = "log_checkpoints"
value = "on"
# other required fields here
}