From d5a675099a0ccf0c35ce1756f5015108cda1489a Mon Sep 17 00:00:00 2001 From: Eugen Date: Sun, 9 Apr 2017 05:46:32 +0200 Subject: [PATCH] Add env variable to disable prepared statements (#1293) --- .env.production.sample | 4 ++++ config/database.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/.env.production.sample b/.env.production.sample index d7c04e2354..fbb2847078 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -63,3 +63,7 @@ SMTP_FROM_ADDRESS=notifications@example.com # Streaming API integration # STREAMING_API_BASE_URL= + +# Advanced settings +# If you need to use pgBouncer, you need to disable prepared statements: +# PREPARED_STATEMENTS=false diff --git a/config/database.yml b/config/database.yml index 5ec342f939..810b832780 100644 --- a/config/database.yml +++ b/config/database.yml @@ -22,3 +22,4 @@ production: password: <%= ENV['DB_PASS'] || '' %> host: <%= ENV['DB_HOST'] || 'localhost' %> port: <%= ENV['DB_PORT'] || 5432 %> + prepared_statements: <%= ENV['PREPARED_STATEMENTS'] || 'true' %>