Skip to content

Commit

Permalink
update postgresql parameters for db investigations
Browse files Browse the repository at this point in the history
  • Loading branch information
alismx committed Jun 7, 2023
1 parent ee0e325 commit da74a1b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ops/services/postgres_db/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,21 @@ resource "azurerm_postgresql_flexible_server_configuration" "pgms_wait_sampling_
server_id = azurerm_postgresql_flexible_server.db.id
value = "ALL"
}

# AzureDiagnostics
# | where ResourceProvider =="MICROSOFT.DBFORPOSTGRESQL"
# | where Category == "PostgreSQLLogs"
# | where Message contains "log_min_duration_statement"

resource "azurerm_postgresql_flexible_server_configuration" "log_min_duration_statement" {
name = "log_min_duration_statement"
server_id = azurerm_postgresql_flexible_server.db.id
value = 50
}

# This is useful for finding queries that have the most impact on our system. It's disabled by default for performance reasons.
resource "azurerm_postgresql_flexible_server_configuration" "pg_stat_statements" {
name = "pg_stat_statements.track"
server_id = azurerm_postgresql_flexible_server.db.id
value = "TOP"
}

0 comments on commit da74a1b

Please sign in to comment.