Why Synapse upgrades can force a platform upgrade first
If your Synapse homeserver runs on an old Python or PostgreSQL, the platform upgrade comes before the Synapse upgrade. Synapse 1.142.0 requires Python 3.10 or newer, and 1.143.0 requires PostgreSQL 14 or newer. A release can therefore refuse to install or start on a host that worked fine on the previous one, so the question to answer first is whether your current Python and database versions clear the floor of the release you plan to reach. Synapse's installation docs list Python 3.10 through 3.13 as supported, so a host on Python 3.9 or earlier needs a runtime change before any Synapse change. Synapse drops support for a Python or PostgreSQL version once that version reaches upstream end of life, which means the floor can rise on a release date you do not control.
PostgreSQL is the component most likely to be at risk. Per the PostgreSQL versioning policy, version 14 is supported until November 12, 2026, version 15 until November 11, 2027, version 16 until November 9, 2028, version 17 until November 8, 2029 and version 18 until November 14, 2030. Versions 13 and earlier are already unsupported. A cluster on 14 is therefore one that Synapse may stop accepting in a future release while its own support window is closing. Check the exact server_version on every database node, including standbys and any managed service, and confirm with your Synapse release notes which floor the next target release sets. Note that a cluster on 14 that is still inside its support window may still need an upgrade to meet the Synapse floor for your target release.
Plan the platform upgrade as its own change with its own rollback point. The Synapse upgrade notes warn that rolling back can be difficult because of schema changes, so a database upgrade should be tested on a copy of production before the Synapse version moves. Decide early whether you will upgrade PostgreSQL in place, through pg_upgrade, or through logical replication to a new cluster, because that choice drives downtime and the locale checks covered elsewhere on this page. Ask your team to confirm the Python runtime path for your operating system and to record which package sources supply both Python and PostgreSQL, so a security patch to one does not silently change the other.
Which platform changes Synapse releases require
This table compares the platform floors and upgrade constraints that Synapse releases impose on Python, PostgreSQL and database schema changes. Read each row as a gate: the impact column says what breaks or blocks you, and the action column says what to plan before the target release. Confirm exact requirements in the release notes for each target version before scheduling work.
| Change | Impact | Action needed |
|---|---|---|
| Python 3.10 floor from 1.142.0 | Synapse 1.142.0 and later will not run on Python versions older than 3.10, so hosts on older interpreters cannot take that release. | Confirm the Python version on each homeserver and worker host, and upgrade the interpreter or virtual environment before the target release. |
| PostgreSQL 14 floor from 1.143.0 | Synapse 1.143.0 and later require PostgreSQL 14 or newer, so a database on version 13 or earlier blocks the upgrade. | Confirm the PostgreSQL major version in use, and plan a major upgrade under a live homeserver if it is older than 14. |
| Python 3.10 to 3.13 supported | The installation docs list Python 3.10 through 3.13 as supported, so versions outside that range are outside the documented support set. | Check the installation docs for the target release and align the interpreter version with the supported range. |
| Rollback difficulty from schema changes | Database schema changes between releases can make it hard or impossible to return to an earlier Synapse version after a restart. | Take a verified database backup before each upgrade, and confirm the rollback guidance in the upgrade notes for each version you pass through. |
| Drop of end-of-life platform versions | Synapse drops support for Python and PostgreSQL versions once they reach upstream end of life, so an unchanged host can become unsupported without a Synapse change. | Track upstream end-of-life dates for your Python and PostgreSQL versions and schedule platform upgrades ahead of them. |
| PostgreSQL 14 end date of November 12, 2026 | PostgreSQL 14 is supported only until November 12, 2026, after which it receives no further upstream fixes. | Plan the move to a currently supported PostgreSQL major version, such as 17 or 18, before that date and confirm the Synapse floor for that version. |
How the Python and PostgreSQL floors are set
The PostgreSQL minimum is not chosen by Synapse maintainers on a whim. It follows Synapse's dependency deprecation policy, which drops support for a database or runtime version once upstream has ended its life. That means the floor moves over time, and a Synapse release that raises it is a planning event for your team, not a routine patch. The upgrade notes name the exact release where each floor takes effect, for example Synapse 1.143.0 and later requiring PostgreSQL 14 or newer and 1.142.0 and later requiring Python 3.10 or newer. Confirm the current floors in the Synapse upgrade notes before you pick a target release.
PostgreSQL's own versioning policy sets the pace. The project releases a new major version about once a year, issues minor releases at least once every three months, and supports each major version for five years after its initial release. Supported versions at the time of writing are 18 through 14, with 14 scheduled to reach end of life in November 2026. A PostgreSQL 14 cluster that is still running in production will therefore hit an unsupported database engine before the Synapse floor forces the change, so the two clocks need to be read together. Put the end-of-life dates for every database and runtime in your stack on the same calendar as your Synapse upgrade cycle.
Because the floors arrive on a schedule, the work to meet them is a repeating cost, not a one-time task. Read the upgrade notes for every release between your current version and your target, not only the final one, since a floor can change in a middle release and schema changes can stack up. Record which Python and PostgreSQL versions each step requires, and decide early whether the database move happens before or alongside the Synapse change. Ask your deployment partner or Element for the support window of your chosen release line so the floor changes fit your change control. Treat the floors as an input to the next upgrade plan, reviewed each time a new Synapse release is scheduled.
Sequence for moving Python and PostgreSQL under a live homeserver
This sequence moves a running Synapse homeserver onto a supported Python and PostgreSQL pair in a planned order, with a rollback point before the database cutover and a verified homeserver afterward.
Inventory current Python and PostgreSQL versions
The operator or the partner's engineer records the Python interpreter version used by Synapse, the Synapse release in production, the PostgreSQL major and minor version, and every installed extension, including any used by the database schema. They also capture the current COLLATE and CTYPE values of the Synapse database, the connection pool settings, and where the database runs (on a host, in a container, or as a managed service). Done means a written inventory that a second engineer has reviewed and that names each version and extension in use.
Confirm target versions against upgrade notes
Before any change, the team reads the Synapse upgrade notes for every release between the current version and the intended target. They check the Python floor and the PostgreSQL floor each release sets, and they confirm the target PostgreSQL major version is still within its supported window on the date of the change, using the PostgreSQL versioning policy. Done means a short decision record that lists the target Synapse release, the target Python version, the target PostgreSQL major version, and the reason each was chosen.
Take and verify a full backup
The database owner takes a full logical or physical backup of the Synapse database, plus a copy of the homeserver configuration files, signing keys and media store metadata. The team restores the backup into a scratch PostgreSQL instance and confirms that Synapse starts against it and that row counts and recent events match production. Done means a restore test has passed and the backup location, checksum and restore procedure are recorded. This is the first rollback point, and it is only usable if the restore test has passed.
Build a staging copy of the homeserver
The team builds a staging environment with the target Python, the target PostgreSQL version and the target Synapse release, then restores the production backup into it. They run Synapse against the restored database and confirm that schema migrations complete, and they measure how long background database updates take to finish. Done means the staging homeserver starts cleanly, the logs show no migration errors, and the team has a rehearsed runbook with the exact commands used.
Upgrade PostgreSQL by a chosen method
In staging first, and then in production, the team moves the database to the target major version using one of the PostgreSQL methods: pg_upgrade, a dump and restore with pg_dumpall, or logical replication into a new cluster. Pg_upgrade keeps the data directory compatible with the upgrade tool, a dump and restore is slower but simple, and logical replication allows a cutover with only several seconds of downtime, according to the PostgreSQL upgrading documentation, but requires careful handling of sequences and schema changes. Minor PostgreSQL updates are different: they never change the internal storage format, so they only replace executables and require a restart. Done means the new cluster is serving the Synapse database and the old cluster is kept intact until the rollback window closes.
Check COLLATE and CTYPE on the new cluster
Before Synapse connects, the team checks the COLLATE and CTYPE settings of the Synapse database on the new cluster and compares them with the values recorded in the inventory. Synapse will not start if these are wrong unless allow_unsafe_locale is set, so a mismatch is a stop condition, and the fix is to recreate the database with the correct locale rather than to bypass the check. Done means both values match the original database, verified with a query against the catalog, and the result is saved in the change record.
Upgrade Python and Synapse, then let background updates finish
The team upgrades the Python runtime and then Synapse to the target release, in the order the upgrade notes specify, and restarts the main process and all workers. Synapse applies remaining schema changes through background database updates after startup, and the team watches the logs and database activity until these updates complete before the next upgrade step. Done means Synapse reports healthy, the background updates queue is empty, and no migration errors appear in the logs.
Verify federation and client traffic
After the cutover, the operator tests client login, room creation, message send and receive, media upload and download, and a federation exchange with a second homeserver that the team controls or with a known federating partner. They check the federation listener on port 8448 or the delegated endpoint, the reverse proxy logs and the error rate on the Synapse metrics. Done means the test checklist is complete, the rollback window and the date it closes are recorded, and the old PostgreSQL cluster is retired only after the window has passed without incident.
What to prepare before the PostgreSQL cutover
Upgrading PostgreSQL under a live Synapse homeserver is a change to the database every Matrix room and user depends on. The cards below cover the preparation that determines whether a cutover can be reversed, measured and signed off, and each one names what your own environment must confirm before work starts.
Verified backups and restore tests
A backup that has never been restored is an assumption, not a recovery plan. Take a full logical dump of the Synapse database, restore it to a scratch server, and start a Synapse process against the restored copy to confirm it serves rooms and accepts logins. Confirm your backup window, retention period and who holds the restore runbook. Because Synapse upgrade notes warn that rolling back can be difficult, this restore test is often your only real rollback path.
PITR documentationInventory of Python packages and extensions
Synapse runs on a Python interpreter and its pinned packages, and the PostgreSQL cluster may carry extensions or custom configuration files that the new major version does not carry forward automatically. List the installed Python version and virtual environment, the PostgreSQL extensions in use, and any custom postgresql.conf or pg_hba.conf entries. Confirm which of these your new packaging path supplies, and which you must rebuild or retest after the move.
Staging cluster that matches production
A staging cluster with the same PostgreSQL major version, Python version, Synapse release and data volume exposes timing and schema problems before users do. Build it from a recent production backup, not an empty database, so that background updates and the upgrade path run against realistic data. Confirm the staging hardware, network path and reverse proxy match production closely enough that load and client behavior are meaningful.
Locale and encoding audit
Synapse will not start if the database COLLATE or CTYPE is wrong unless allow_unsafe_locale is set, so a new cluster initialized with a different locale can block the homeserver at first start. Record the current collation and character type of the Synapse database, then confirm the new cluster is initialized with matching values before any data is restored. Ask your database team whether the operating system locale packages are present on every node that may run the cluster.
Maintenance window and change control
A cutover interrupts or degrades service for every user on the homeserver, and federation peers will notice delayed events. Agree a maintenance window with the business owners, define the go and no-go criteria in writing, and name who can authorize rollback. Confirm how your change system records the PostgreSQL and Synapse versions in use, and who approves the move from staging to production.
Monitoring baselines
Without a baseline taken before the cutover, you cannot tell whether a slower query or a higher replication lag was caused by the move or was already present. Capture query latency, connection counts, database size, replication state and Synapse event processing rates on the current cluster for at least one normal business cycle. Confirm which metrics your monitoring stack already collects and which you must add before the window opens.
Choosing pg_upgrade, dump and restore, or logical replication
The PostgreSQL project documents three ways to move a cluster to a new major version: dump and restore, pg_upgrade, and logical replication. The choice depends on how much data Synapse holds, how long the homeserver can stop writing, and how much rollback room you want. Dump and restore is the simplest method and is usually the easiest to reason about for a small database, since you export everything with pg_dumpall and load it into the new cluster. Its cost is downtime that grows with database size, because the homeserver must stay stopped for the whole export and restore. Confirm the size of your database and the downtime window your users and governance process allow before you rule it in or out.
Logical replication works between different major versions, and the PostgreSQL upgrading documentation states that it allows a major upgrade with only several seconds of downtime. It takes more planning: you set up publication and subscription on the new cluster, let it catch up, then cut Synapse over. Schema changes and sequence handling need checking, and the replication setup adds operational work for the cutover. pg_upgrade sits between the two. In PostgreSQL 18, pg_upgrade retains planner statistics across major upgrades and adds parallel jobs and a --swap option, which can shorten the window on large data directories. Your decision should rest on your own rehearsal results, measured against a copy of your Synapse database, with the Synapse version you plan to run.
Questions teams ask before upgrading Synapse's platform floors
How long does a Synapse platform floor upgrade take?
No fixed duration is supplied for this work, so treat any number a vendor gives as a planning assumption to test. The length is driven by how many components change at once: the Python runtime on each homeserver host, the PostgreSQL major version, the number of workers and their dependencies, and the size of the database. Synapse must also be on a release that requires the new floor, and background database updates that run after an upgrade can extend the period before the homeserver is fully settled. Ask for a written plan that lists each step, the environments it covers (staging and production), and the checkpoints where you confirm the system is healthy before moving on.
Can our own team upgrade Synapse's Python and PostgreSQL without a partner?
Yes, many teams do this in-house, provided they have people who can run both a Python service and a PostgreSQL cluster and who can test the result. The main risk is not the commands but the sequencing and the rollback position. Confirm that your staff can build a staging copy of production, rehearse the PostgreSQL move, and verify that clients, federation and admin tools still work afterward. Also confirm who owns the change window and who approves a rollback. A partner is most useful when the team lacks that operating experience or needs the work documented as evidence for an assessment.
What skills and time does our staff need to commit?
Plan for named engineers across three areas: Synapse and Python packaging on the homeserver hosts, PostgreSQL administration, and whoever owns reverse proxy, TLS and identity integration. Each person needs time for a staging rehearsal, the production window, and post-change monitoring. Confirm that at least one person can read the Synapse upgrade notes for every release between your current version and the target, because the notes describe changes that affect configuration and schema. Also confirm who will watch logs and user reports after the change, since problems such as locale errors can appear only after restart.
Do we have to upgrade PostgreSQL when we upgrade Python?
Not necessarily, because the two floors come from different sources. Synapse sets the minimum Python version through its releases, with Python 3.10 or newer required from 1.142.0 onward, and the minimum PostgreSQL version through its dependency deprecation policy, with PostgreSQL 14 or newer required from 1.143.0 onward. Check your current PostgreSQL major version against the supported list in the PostgreSQL versioning policy. PostgreSQL 14 is listed as supported until November 12, 2026, so a cluster on 14 may need a planned move regardless of Synapse. Many teams combine the work into one project to reduce the number of change windows, but confirm this against your own Synapse target version.
How do we roll back if the new PostgreSQL cluster fails?
Rollback is the hardest part of this work, so decide it before the change begins. The Synapse upgrade notes warn that rolling back can be difficult because schema changes between releases may not reverse cleanly, so a Synapse downgrade alone may not restore service. For PostgreSQL, confirm which method you will use: a logical replication cutover keeps the old cluster available for reversal, while pg_upgrade and dump-and-restore require a tested backup and a defined point of no return. Keep point-in-time recovery backups current, rehearse the restore on a copy, and write down the exact trigger that starts a rollback.
What should a quote for this upgrade include?
A quote should follow directly from a written scope, so ask for the scope first. It should list each environment covered, the Synapse release range and the Python and PostgreSQL versions named as targets, the PostgreSQL method chosen and why, and the number of hosts, workers and database instances in scope. Ask whether it covers the staging rehearsal, the production window, post-change monitoring, the rollback test and the handover documentation. Separate one-time work from anything recurring, such as a support retainer for later upgrades. Confirm what the client provides, including access, change approval and backups, and what happens if the schedule moves. DeployOpen does not publish a price list, and a quote follows from the agreed written scope.
Which PostgreSQL locale settings must we check on the new cluster?
Check the database COLLATE and CTYPE values on the new cluster before pointing Synapse at it. Synapse will not start if these are wrong unless the allow_unsafe_locale option is set, so a mismatch shows up as a startup failure rather than a silent problem. Confirm the values on the old database, then create the new cluster or database with matching settings. Treat changing allow_unsafe_locale as a decision to record and review, not a shortcut, because it accepts a configuration the Synapse documentation treats as unsafe. Add this check to the rehearsal so it is confirmed before the production window.
What makes a platform upgrade take longer
This table lists the factors that stretch a Synapse platform upgrade across Python, PostgreSQL and locale changes, with why each matters and how it affects effort. Read each row alongside the inventory step that sizes it, because most overruns come from drivers nobody measured before the change window was set.
| Driver | Why it matters | Effect on effort |
|---|---|---|
| Database size and background update backlog | Synapse finishes schema changes after restart through background updates, and a large unfinished backlog must clear before the next release. Major PostgreSQL moves also copy or replay more data as the database grows. | High. Expect longer windows and extra waiting. Inventory database size, table growth, and any background updates still running in the current version. |
| Number of releases between current and target | Upgrade notes must be read for each intermediate version, and Synapse may require stepping through versions with incompatible schema changes. Rollback becomes harder with each schema change. | High. Each skipped step adds reading, testing and a restart cycle. Inventory the installed version and list every release notes page between it and the target. |
| Custom modules and bridges pinned to old Python | Modules, bridges and helper scripts may not run on the Python version Synapse now requires. Each one needs a compatible release or a rewrite before the homeserver can move. | Medium to high. Depends on how many components are pinned. Inventory every plugin, bridge and script, its Python version, and its maintainer's upgrade status. |
| PostgreSQL extensions and replication setup | Extensions must exist on the new major version, and replicas or logical replication subscriptions must be rebuilt or re-pointed. Failover tooling may also need changes. | Medium. Inventory installed extensions, replication topology, backup tooling and any connection pooler settings. |
| Locale mismatches on the new cluster | Synapse refuses to start if the database COLLATE or CTYPE is wrong unless allow_unsafe_locale is set. A new cluster created with different locale settings can block the cutover until data is rebuilt. | Medium to high, and hard to predict late. Check the current database locale and confirm the target cluster's settings in a test restore before scheduling. |
| Number of environments | Each environment, including test, staging and production, repeats the Python, PostgreSQL and configuration work. Drift between them is a common source of rework. | Medium, multiplied per environment. Inventory each environment, its version, its configuration source and whether it mirrors production data size. |
| Availability requirements for live federation | Other servers keep sending events during the upgrade. Downtime may cause queued traffic, delayed delivery and user-facing gaps, and a rehearsed rollback path needs more planning when uptime matters. | High where uptime is a stated requirement. Inventory the acceptable outage window, federation traffic volume, and whether workers or replicas can absorb a restart. |
How the platform layers move during the upgrade
The diagram starts with a running Synapse process on its current Python runtime, connected to a PostgreSQL primary and, optionally, a replica. Before any change, take a backup and record the rollback point, because the Synapse upgrade notes warn that rolling back after schema changes can be difficult. Next, confirm that the locale on the target cluster matches the existing database, since Synapse will not start with a wrong COLLATE or CTYPE unless allow_unsafe_locale is set. Then choose one cutover method: pg_upgrade, dump and restore, or logical replication. Each path ends on the upgraded PostgreSQL cluster, where Synapse runs on a supported Python version.
Current stack, decision points and cutover paths for a Synapse PostgreSQL upgrade.
How DeployOpen scopes and delivers this upgrade
DeployOpen plans and implements self-hosted Synapse homeservers inside infrastructure you control, including the Python and PostgreSQL changes that Synapse releases force. Each engagement starts with a written scope that names your current versions, your target Synapse release and the platform work it requires.
How we scope
- We record your current Synapse, Python, PostgreSQL and operating system versions before any change is planned.
- The written scope names the target Synapse release and the Python and PostgreSQL floors it requires.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
- We confirm locale settings, database size and worker layout so the scope reflects your actual environment.
How we build
- We stage the Python and PostgreSQL changes in a non-production copy of the homeserver first.
- We test the chosen PostgreSQL upgrade method, whether dump and restore, pg_upgrade or logical replication, against a copy of your data.
- We check that the new cluster uses the expected COLLATE and CTYPE before Synapse connects to it.
- We verify that background database updates complete and that the homeserver passes smoke tests before cutover.
How we hand over
- You receive a runbook covering each step, its checks, the rollback limits and the point of no return.
- We document the final Python and PostgreSQL versions, configuration changes and any allow_unsafe_locale decisions.
- Operators are walked through monitoring, backups and the restore test for the upgraded database.
- We leave a dated record of what changed, so your change control and audit teams can review it.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- A retainer can track upstream Synapse, Python and PostgreSQL end-of-life dates for your planned upgrade windows.
- Retesting follows each platform change, so dependency updates do not silently break your homeserver.
- Ask for a quote built from the written scope, listing one-time work separately from recurring support.

