Skip to content

Commit 983c335

Browse files
committed
Add prepared_statements and advisory_locks to database.yml
1 parent 315b52d commit 983c335

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,8 @@ 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/) |
935+
| `DB_ADVISORY_LOCKS` | Whether use database advisory locks. No defaults. But set to `false` if you want to use with [PgBouncer](https://pgbouncer.github.io/) |
934936
| `SMTP_ENABLED` | Enable mail delivery via SMTP. Defaults to `true` if `SMTP_USER` is defined, else defaults to `false`. |
935937
| `SMTP_DOMAIN` | SMTP domain. Defaults to` www.gmail.com` |
936938
| `SMTP_HOST` | SMTP server host. Defaults to `smtp.gmail.com`. |

assets/runtime/config/gitlabhq/database.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ production:
1010
username: {{DB_USER}}
1111
password: "{{DB_PASS}}"
1212
pool: {{DB_POOL}}
13+
prepared_statements: {{DB_PREPARED_STATEMENTS}}
14+
advisory_locks: {{DB_ADVISORY_LOCKS}}
1315

assets/runtime/env-defaults

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ 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:-}
48+
DB_ADVISORY_LOCKS=${DB_ADVISORY_LOCKS:-}
4749

4850
# backward compatibility
4951
case ${DB_TYPE} in

assets/runtime/functions

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ gitlab_configure_database() {
182182
DB_NAME \
183183
DB_USER \
184184
DB_PASS \
185-
DB_POOL
185+
DB_POOL \
186+
DB_PREPARED_STATEMENTS \
187+
DB_ADVISORY_LOCKS
186188
}
187189

188190
gitlab_finalize_redis_parameters() {

0 commit comments

Comments
 (0)