Commit 05e89476 authored by Sean John Hoyle's avatar Sean John Hoyle Committed by Evan Read

Add Note about Praefect database tables not being created on initial reconfigure

parent dfb19b64
...@@ -161,6 +161,34 @@ node, using `psql` which is installed by Omnibus GitLab. ...@@ -161,6 +161,34 @@ node, using `psql` which is installed by Omnibus GitLab.
The database used by Praefect is now configured. The database used by Praefect is now configured.
If you see Praefect database errors after configuring PostgreSQL, see
[troubleshooting steps below](#relation-does-not-exist-errors).
#### Relation does not exist errors
By default Praefect database tables are created automatically by `gitlab-ctl reconfigure` task.
However, if the `gitlab-ctl reconfigure` command isn't executed or there are errors during the
execution, the Praefect database tables are not created on initial reconfigure and can throw
errors that relations do not exist.
For example:
- `ERROR: relation "node_status" does not exist at character 13`
- `ERROR: relation "replication_queue_lock" does not exist at character 40`
- This error:
```json
{"level":"error","msg":"Error updating node: pq: relation \"node_status\" does not exist","pid":210882,"praefectName":"gitlab1x4m:0.0.0.0:2305","time":"2021-04-01T19:26:19.473Z","virtual_storage":"praefect-cluster-1"}
```
To solve this, the database schema migration can be done using `sql-migrate` subcommand of
the `praefect` command:
```shell
$ sudo /opt/gitlab/embedded/bin/praefect -config /var/opt/gitlab/praefect/config.toml sql-migrate
praefect sql-migrate: OK (applied 21 migrations)
```
#### PgBouncer #### PgBouncer
To reduce PostgreSQL resource consumption, we recommend setting up and configuring To reduce PostgreSQL resource consumption, we recommend setting up and configuring
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment