Ensure Server Parameter 'log_checkpoints' is set to 'ON' for PostgreSQL Database Server

Enabling log_checkpoints helps the PostgreSQL Database to Log each checkpoint 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.

Risk Level: Low
Cloud Entity: Azure Database for PostgreSQL
CloudGuard Rule ID: D9.AZU.LOG.10
Covered by Spectral: Yes
Category: Database


PostgreSQL should have logsConfiguration contain [ name='log_checkpoints' and value regexMatch /[Oo][Nn]/ ]


From Portal

  1. Sign in to Azure Management Console
  2. Go to Azure Database for PostgreSQL server
  3. For each database, click on Server parameters
  4. Search for log_checkpoints
  5. Click ON and save.

From TF
Set the 'name' and 'value' arguments under 'azurerm_postgresql_configuration' as below:

resource "azurerm_postgresql_configuration" "example" {
	name = "log_checkpoints"
	value = "on"

From Command Line

az postgres server configuration set --resource-group RESOURCEGROUPNAME --server-name SERVERNAME --name log_checkpoints --value on


  1. https://docs.microsoft.com/en-us/azure/postgresql/concepts-server-logs
  2. https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/postgresql_configuration#name
  3. https://docs.microsoft.com/en-us/cli/azure/postgres/server/configuration?view=azure-cli-latest#az-postgres-server-configuration-set

Azure Database for PostgreSQL

Azure Database for PostgreSQL is a relational database service based on the open-source Postgres database engine. It's a fully managed database as a service offering that can handle mission-critical workloads with predictable performance, security, high availability, and dynamic scalability. It's available in two deployment options, Single Server and Hyperscale (Citus) (preview). The Hyperscale (Citus) option horizontally scales queries across multiple machines using sharding, and serves applications that require greater scale and performance

Compliance Frameworks

  • Azure CIS Foundations v. 1.1.0
  • Azure CIS Foundations v. 1.2.0
  • Azure CIS Foundations v. 1.3.0
  • Azure CIS Foundations v. 1.3.1
  • Azure CIS Foundations v. 1.4.0
  • Azure CIS Foundations v. 1.5.0
  • Azure CIS Foundations v.2.0
  • Azure CloudGuard Best Practices
  • Azure ITSG-33
  • Azure NIST 800-53 Rev 5
  • CloudGuard Azure All Rules Ruleset