Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove support for PostgreSQL 10 (#14392)
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Quah <[email protected]>
  • Loading branch information
squahtx authored Nov 8, 2022
1 parent d85cba1 commit a5fcdea
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .ci/scripts/calculate_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def set_output(key: str, value: str):
{
"python-version": "3.7",
"database": "postgres",
"postgres-version": "10",
"postgres-version": "11",
"extras": "all",
}
]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ jobs:
matrix:
include:
- python-version: "3.7"
postgres-version: "10"
postgres-version: "11"

- python-version: "3.11"
postgres-version: "14"
Expand Down
1 change: 1 addition & 0 deletions changelog.d/14392.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove support for PostgreSQL 10.
10 changes: 10 additions & 0 deletions docs/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ process, for example:
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
```
# Upgrading to v1.72.0
## Dropping support for PostgreSQL 10
In line with our [deprecation policy](deprecation_policy.md), we've dropped
support for PostgreSQL 10, as it is no longer supported upstream.

This release of Synapse requires PostgreSQL 11+.


# Upgrading to v1.71.0

## Removal of the `generate_short_term_login_token` module API method
Expand Down
4 changes: 2 additions & 2 deletions synapse/storage/engines/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def check_database(
allow_unsafe_locale = self.config.get("allow_unsafe_locale", False)

# Are we on a supported PostgreSQL version?
if not allow_outdated_version and self._version < 100000:
raise RuntimeError("Synapse requires PostgreSQL 10 or above.")
if not allow_outdated_version and self._version < 110000:
raise RuntimeError("Synapse requires PostgreSQL 11 or above.")

with db_conn.cursor() as txn:
txn.execute("SHOW SERVER_ENCODING")
Expand Down

0 comments on commit a5fcdea

Please sign in to comment.