Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/administration/postgresql/pgbouncer.md')
-rw-r--r--doc/administration/postgresql/pgbouncer.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/administration/postgresql/pgbouncer.md b/doc/administration/postgresql/pgbouncer.md
index 9db3e017359..7760b197267 100644
--- a/doc/administration/postgresql/pgbouncer.md
+++ b/doc/administration/postgresql/pgbouncer.md
@@ -1,4 +1,7 @@
---
+stage: Enablement
+group: Database
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
type: reference
---
@@ -145,6 +148,35 @@ ote_pid | tls
(1 row)
```
+## Procedure for bypassing PgBouncer
+
+Some database changes have to be done directly, and not through PgBouncer. This includes database restores and GitLab upgrades (because of the database migrations).
+
+1. To find the primary node, run the following on a database node:
+
+ ```shell
+ sudo gitlab-ctl repmgr cluster show
+ ```
+
+1. Edit `/etc/gitlab/gitlab.rb` on the application node you're performing the task on, and update
+ `gitlab_rails['db_host']` and `gitlab_rails['db_port']` with the database
+ primary's host and port.
+
+1. Run reconfigure:
+
+ ```shell
+ sudo gitlab-ctl reconfigure
+ ```
+
+Once you've performed the tasks or procedure, switch back to using PgBouncer:
+
+1. Change back `/etc/gitlab/gitlab.rb` to point to PgBouncer.
+1. Run reconfigure:
+
+ ```shell
+ sudo gitlab-ctl reconfigure
+ ```
+
## Troubleshooting
In case you are experiencing any issues connecting through PgBouncer, the first