DB for PostgreSQL
The presented resiliency recommendations in this guidance include Database for PostgreSQL and associated resources and settings.
Summary of Recommendations
Recommendation | Category | Impact | State | ARG Query Available |
---|---|---|---|---|
PSQL-1 - Enable HA with zone redundancy | Availability | High | Verified | Yes |
PSQL-2 - Enable custom maintenance schedule | System Efficiency | High | Verified | Yes |
Definitions of states can be found here
Recommendations Details
PSQL-1 - Enable HA with zone redundancy
Category: Availability
Impact: High
Recommendation
Enable HA with zone redundancy on flexible server instances. Zone redundant high availability deploys a standby replica in a different zone with automatic failover capability.
Resources
Resource Graph Query
// Azure Resource Graph Query
// Find Database for PostgreSQL instances that are not zone redundant
resources
| where type == "microsoft.dbforpostgresql/flexibleservers"
| where properties.highAvailability.mode != "ZoneRedundant"
| project recommendationId = "psql-1", name, id, tags, param1 = "ZoneRedundant: False"
PSQL-2 - Enable custom maintenance schedule
Category: System Efficiency
Impact: High
Recommendation
Use custom maintenance schedule on flexible server instances to select a preferred time for service updates to be applied.
Resources
Resource Graph Query
// Azure Resource Graph Query
// Find Database for PostgreSQL instances that do not have a custom maintenance window
resources
| where type == "microsoft.dbforpostgresql/flexibleservers"
| where properties.maintenanceWindow.customWindow != "Enabled"
| project recommendationId = "psql-2", name, id, tags, param1 = strcat("customWindow:", properties['maintenanceWindow']['customWindow'])