Skip to content
Snippets Groups Projects
Commit ad5dda4c authored by Balasankar "Balu" C's avatar Balasankar "Balu" C
Browse files

Add release note about automatic PG restart on version change

parent a9810fc7
No related branches found
No related tags found
1 merge request!72Intermediate build for testing purposes
......@@ -39,6 +39,35 @@
If changing the setting will require a restart, the query will return the name of the setting and the current value
of that setting in the running PostgreSQL instance.
#### Automatic restart when the PostgreSQL version changes
By default, Omnibus automatically restarts PostgreSQL when the underlying
version changes, as suggested by the [upstream documentation](https://www.postgresql.org/docs/13/upgrading.html).
This behavior can be controlled using the `auto_restart_on_version_change` setting
available for `postgresql` and `geo-postgresql`.
To disable automatic restarts when the PostgreSQL version changes:
1. Edit `/etc/gitlab/gitlab.rb` and add the following line:
```ruby
# For PostgreSQL/Patroni
postgresql['auto_restart_on_version_change'] = false
# For Geo PostgreSQL
geo_postgresql['auto_restart_on_version_change'] = false
```
1. Reconfigure GitLab:
```shell
sudo gitlab-ctl reconfigure
```
NOTE:
It is highly recommended to restart PostgreSQL when underlying version changes,
to avoid errors like the [one related to loading necessary libraries](#could-not-load-library-plpgsqlso).
### Configuring SSL
Omnibus automatically enables SSL on the PostgreSQL server, but it will accept
......@@ -967,6 +996,37 @@
changed the configuration. This configuration comes by default in the packaged
PostgreSQL server included with Omnibus GitLab.
### Could not load library `plpgsql.so`
You might see errors similar to the following while running Database migrations
or in the PostgreSQL/Patroni logs:
```plaintext
ERROR: could not load library "/opt/gitlab/embedded/postgresql/12/lib/plpgsql.so": /opt/gitlab/embedded/postgresql/12/lib/plpgsql.so: undefined symbol: EnsurePortalSnapshotExists
```
This error is caused due to not restarting PostgreSQL after the underlying
version changed. To fix this error:
1. Run one of the following commands:
```shell
# For PostgreSQL
sudo gitlab-ctl restart postgresql
# For Patroni
sudo gitlab-ctl restart patroni
# For Geo PostgreSQL
sudo gitlab-ctl restart geo-postgresql
```
1. Reconfigure GitLab:
```shell
sudo gitlab-ctl reconfigure
```
## Application Settings for the Database
### Disabling automatic database migration
......
......@@ -16,7 +16,7 @@
In GitLab 15.0, PostgreSQL versions have been updated to v12.10 and v13.6
respectively. Because of underlying structural changes, the running PostgreSQL
process **_must_** be restarted before running database migrations. If automatic
restart is skipped, users must make sure the following command is run before
restart is skipped, you must run the following command before
migrations are run:
```shell
......@@ -27,6 +27,45 @@
sudo gitlab-ctl restart patroni
```
If PostgreSQL is not restarted, you might face
[errors related to loading libraries](../settings/database.md#could-not-load-library-plpgsqlso).
### Automatic restart of PostgreSQL service on version change
Starting with GitLab 15.0, `postgresql` and `geo-postgresql` services are
automatically restarted when the PostgreSQL version changes. Restarting
PostgreSQL services causes downtime due to the temporary unavailability of the
database for operations. While this restart is mandatory for proper functioning
of the Database services, you might want more control over when the PostgreSQL
is restarted. For that purpose, you can choose to skip the automatic restarts as
part of `gitlab-ctl reconfigure` and manually restart the services.
To skip automatic restarts as part of GitLab 15.0 upgrade, perform the following
steps before the upgrade:
1. Edit `/etc/gitlab/gitlab.rb` and add the following line:
```ruby
# For PostgreSQL/Patroni
postgresql['auto_restart_on_version_change'] = false
# For Geo PostgreSQL
geo_postgresql['auto_restart_on_version_change'] = false
```
1. Reconfigure GitLab:
```shell
sudo gitlab-ctl reconfigure
```
NOTE:
It is mandatory to restart PostgreSQL when underlying version changes, to avoid
errors like the [one related to loading necessary libraries](../settings/database.md#could-not-load-library-plpgsqlso)
that can cause downtime. So, if you skip the automatic restarts using the above
method, ensure that you restart the services manually before upgrading to GitLab
15.0.
### AES256-GCM-SHA384 SSL cipher no longer allowed by default by NGINX
Starting with GitLab 15.0, the `AES256-GCM-SHA384` SSL cipher will not be allowed by
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment