Update postgres.md (#18445)

This commit is contained in:
Strac Consulting Engineers Pty Ltd
2025-05-20 23:31:05 +10:00
committed by GitHub
parent 303c5c4daa
commit a6cb3533db
2 changed files with 9 additions and 0 deletions

1
changelog.d/18445.doc Normal file
View File

@@ -0,0 +1 @@
Add advice for upgrading between major PostgreSQL versions to the database documentation.

View File

@@ -100,6 +100,14 @@ database:
keepalives_count: 3
```
## Postgresql major version upgrades
Postgres uses separate directories for database locations between major versions (typically `/var/lib/postgresql/<version>/main`).
Therefore, it is recommended to stop Synapse and other services (MAS, etc) before upgrading Postgres major versions.
It is also strongly recommended to [back up](./usage/administration/backups.md#database) your database beforehand to ensure no data loss arising from a failed upgrade.
## Backups
Don't forget to [back up](./usage/administration/backups.md#database) your database!