Skip to content

Commit 1c7629d

Browse files
sue445solidnerd
andcommitted
Add prepared_statements to database.yml (sameersbn#1994)
* Add prepared_statements to database.yml Co-Authored-By: Niclas Mietz <github@mietz.io>
1 parent edfe149 commit 1c7629d

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,7 @@ Below is the complete list of available options that can be used to customize yo
931931
| `DB_USER` | The database database user. Defaults to `root` |
932932
| `DB_PASS` | The database database password. Defaults to no password |
933933
| `DB_POOL` | The database database connection pool count. Defaults to `10`. |
934+
| `DB_PREPARED_STATEMENTS` | Whether use database prepared statements. No defaults. But set to `false` if you want to use with [PgBouncer](https://pgbouncer.github.io/) |
934935
| `SMTP_ENABLED` | Enable mail delivery via SMTP. Defaults to `true` if `SMTP_USER` is defined, else defaults to `false`. |
935936
| `SMTP_DOMAIN` | SMTP domain. Defaults to` www.gmail.com` |
936937
| `SMTP_HOST` | SMTP server host. Defaults to `smtp.gmail.com`. |

assets/runtime/config/gitlabhq/database.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ production:
1010
username: {{DB_USER}}
1111
password: "{{DB_PASS}}"
1212
pool: {{DB_POOL}}
13+
prepared_statements: {{DB_PREPARED_STATEMENTS}}
1314

assets/runtime/env-defaults

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ DB_NAME=${DB_NAME:-}
4444
DB_USER=${DB_USER:-}
4545
DB_PASS=${DB_PASS:-}
4646
DB_POOL=${DB_POOL:-10}
47+
DB_PREPARED_STATEMENTS=${DB_PREPARED_STATEMENTS:-true}
4748

4849
# backward compatibility
4950
case ${DB_TYPE} in

assets/runtime/functions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ gitlab_configure_database() {
182182
DB_NAME \
183183
DB_USER \
184184
DB_PASS \
185-
DB_POOL
185+
DB_POOL \
186+
DB_PREPARED_STATEMENTS
186187
}
187188

188189
gitlab_finalize_redis_parameters() {

0 commit comments

Comments
 (0)