Skip to content

Commit 101f779

Browse files
ereadbbodenmiller
andcommitted
Merge branch 'db-troubleshooting' into 'master'
Fix database troubleshooting section indentation & location See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7403 Merged-by: Evan Read <[email protected]> Approved-by: Evan Read <[email protected]> Co-authored-by: Ben Bodenmiller <[email protected]>
2 parents 64df294 + 86cedef commit 101f779

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed

doc/settings/database.md

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -932,57 +932,6 @@ sure that any folders that relate to PostgreSQL are deleted and that there are n
932932
933933
For more information, see the example in [configuration documentation](../settings/configuration.md#provide-the-postgresql-user-password-to-gitlab-rails).
934934
935-
### Troubleshooting
936-
937-
#### Set `default_transaction_isolation` into `read committed`
938-
939-
If you see errors similar to the following in your `production/sidekiq` log:
940-
941-
```plaintext
942-
ActiveRecord::StatementInvalid PG::TRSerializationFailure: ERROR: could not serialize access due to concurrent update
943-
```
944-
945-
Chances are your database's `default_transaction_isolation` configuration is not
946-
in line with the GitLab application requirement. You can check this configuration by
947-
connecting to your PostgreSQL database and run `SHOW default_transaction_isolation;`.
948-
GitLab application expects `read committed` to be configured.
949-
950-
This `default_transaction_isolation` configuration is set in your
951-
`postgresql.conf` file. You will need to restart/reload the database once you
952-
changed the configuration. This configuration comes by default in the packaged
953-
PostgreSQL server included with the Linux package.
954-
955-
### Could not load library `plpgsql.so`
956-
957-
You might see errors similar to the following while running Database migrations
958-
or in the PostgreSQL/Patroni logs:
959-
960-
```plaintext
961-
ERROR: could not load library "/opt/gitlab/embedded/postgresql/12/lib/plpgsql.so": /opt/gitlab/embedded/postgresql/12/lib/plpgsql.so: undefined symbol: EnsurePortalSnapshotExists
962-
```
963-
964-
This error is caused due to not restarting PostgreSQL after the underlying
965-
version changed. To fix this error:
966-
967-
1. Run one of the following commands:
968-
969-
```shell
970-
# For PostgreSQL
971-
sudo gitlab-ctl restart postgresql
972-
973-
# For Patroni
974-
sudo gitlab-ctl restart patroni
975-
976-
# For Geo PostgreSQL
977-
sudo gitlab-ctl restart geo-postgresql
978-
```
979-
980-
1. Reconfigure GitLab:
981-
982-
```shell
983-
sudo gitlab-ctl reconfigure
984-
```
985-
986935
## Application Settings for the Database
987936
988937
### Disabling automatic database migration
@@ -1291,3 +1240,54 @@ or as a PostgreSQL superuser:
12911240
```shell
12921241
sudo gitlab-psql -d gitlabhq_production
12931242
```
1243+
1244+
## Troubleshooting
1245+
1246+
### Set `default_transaction_isolation` into `read committed`
1247+
1248+
If you see errors similar to the following in your `production/sidekiq` log:
1249+
1250+
```plaintext
1251+
ActiveRecord::StatementInvalid PG::TRSerializationFailure: ERROR: could not serialize access due to concurrent update
1252+
```
1253+
1254+
Chances are your database's `default_transaction_isolation` configuration is not
1255+
in line with the GitLab application requirement. You can check this configuration by
1256+
connecting to your PostgreSQL database and run `SHOW default_transaction_isolation;`.
1257+
GitLab application expects `read committed` to be configured.
1258+
1259+
This `default_transaction_isolation` configuration is set in your
1260+
`postgresql.conf` file. You will need to restart/reload the database once you
1261+
changed the configuration. This configuration comes by default in the packaged
1262+
PostgreSQL server included with the Linux package.
1263+
1264+
### Could not load library `plpgsql.so`
1265+
1266+
You might see errors similar to the following while running Database migrations
1267+
or in the PostgreSQL/Patroni logs:
1268+
1269+
```plaintext
1270+
ERROR: could not load library "/opt/gitlab/embedded/postgresql/12/lib/plpgsql.so": /opt/gitlab/embedded/postgresql/12/lib/plpgsql.so: undefined symbol: EnsurePortalSnapshotExists
1271+
```
1272+
1273+
This error is caused due to not restarting PostgreSQL after the underlying
1274+
version changed. To fix this error:
1275+
1276+
1. Run one of the following commands:
1277+
1278+
```shell
1279+
# For PostgreSQL
1280+
sudo gitlab-ctl restart postgresql
1281+
1282+
# For Patroni
1283+
sudo gitlab-ctl restart patroni
1284+
1285+
# For Geo PostgreSQL
1286+
sudo gitlab-ctl restart geo-postgresql
1287+
```
1288+
1289+
1. Reconfigure GitLab:
1290+
1291+
```shell
1292+
sudo gitlab-ctl reconfigure
1293+
```

0 commit comments

Comments
 (0)