diff options
author | Stan Hu <stanhu@gmail.com> | 2021-11-17 00:34:33 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2021-11-17 00:36:13 +0300 |
commit | a783ac33976d1efa428eecf1b1cec4a16dd5742e (patch) | |
tree | 20fc9f6727ef6480f46bb9a40a5b7578aa0efdf7 | |
parent | 284a2395b24fcbf1614f486a190379bf42eac6a6 (diff) |
demo: Activate PostgreSQL slow logs
This commit will cause PostgreSQL to log any database statements taking
longer than 500 ms. This is useful to flag any slow queries running in
Praefect.
-rw-r--r-- | _support/terraform/terraform/main.tf | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/_support/terraform/terraform/main.tf b/_support/terraform/terraform/main.tf index 92c38127b..283214279 100644 --- a/_support/terraform/terraform/main.tf +++ b/_support/terraform/terraform/main.tf @@ -47,6 +47,11 @@ resource "google_sql_database_instance" "praefect_sql" { settings { tier = "db-f1-micro" + database_flags { + name = "log_min_duration_statement" + value = "500" + } + ip_configuration{ ipv4_enabled = true |