diff --git a/app/models/global_setting.rb b/app/models/global_setting.rb index 1d89a031224..6f3581d8136 100644 --- a/app/models/global_setting.rb +++ b/app/models/global_setting.rb @@ -26,6 +26,8 @@ class GlobalSetting hash["host_names"] = [ hostname ] hash["database"] = db_name + hash["prepared_statements"] = !!self.db_prepared_statements + {"production" => hash} end diff --git a/config/discourse_defaults.conf b/config/discourse_defaults.conf index 7972879f28d..248aff6421b 100644 --- a/config/discourse_defaults.conf +++ b/config/discourse_defaults.conf @@ -39,6 +39,10 @@ db_username = discourse # password used to access the db db_password = +# allow usage of prepared statements, must be disabled for +# pgpool transaction pooling +db_prepared_statements = true + # hostname running the forum hostname = "www.example.com"