From a97e740629db34949115b664d3e893796810c5cc Mon Sep 17 00:00:00 2001 From: erikjohnston Date: Tue, 12 Apr 2022 14:30:11 +0000 Subject: [PATCH] deploy: a468768104887bd3c0d117096bec7f307dfd348c --- develop/print.html | 49 +++++++++++++++++++++++++++++++++------- develop/searchindex.js | 2 +- develop/searchindex.json | 2 +- develop/upgrade.html | 49 +++++++++++++++++++++++++++++++++------- 4 files changed, 84 insertions(+), 18 deletions(-) diff --git a/develop/print.html b/develop/print.html index d2d604ceb4..a12513359e 100644 --- a/develop/print.html +++ b/develop/print.html @@ -1617,6 +1617,39 @@ worker for application service traffic, it must be stopped when without any risk of reusing transaction IDs.

Deployments which do not use separate worker processes can be upgraded as normal. Similarly, deployments where no applciation services are in use can be upgraded as normal.

+
+Recovering from an incorrect upgrade +

If the database schema is upgraded without stopping the worker responsible +for AS traffic, then the following error may be given when attempting to start +a Synapse worker or master process:

+
**********************************************************************************
+ Error during initialisation:
+
+ Postgres sequence 'application_services_txn_id_seq' is inconsistent with associated
+ table 'application_services_txns'. This can happen if Synapse has been downgraded and
+ then upgraded again, or due to a bad migration.
+
+ To fix this error, shut down Synapse (including any and all workers)
+ and run the following SQL:
+
+     SELECT setval('application_services_txn_id_seq', (
+         SELECT GREATEST(MAX(txn_id), 0) FROM application_services_txns
+     ));
+
+ See docs/postgres.md for more information.
+
+ There may be more information in the logs.
+**********************************************************************************
+
+

This error may also be seen if Synapse is downgraded to an earlier version, +and then upgraded again to v1.57.0 or later.

+

In either case:

+
    +
  1. Ensure that the worker responsible for AS traffic is stopped.
  2. +
  3. Run the SQL command given in the error message via psql.
  4. +
+

Synapse should then start correctly.

+

Upgrading to v1.56.0

Open registration without verification is now disabled by default

Synapse will refuse to start if registration is enabled without email, captcha, or token-based verification unless the new config @@ -1639,15 +1672,15 @@ for more information and instructions on how to fix a database with incorrect va has been made an entry point and no longer exists at the root of Synapse's source tree. If you wish to use -synctl to manage your homeserver, you should invoke synctl directly, e.g. -synctl start instead of ./synctl start or /path/to/synctl start.

+synctl to manage your homeserver, you should invoke synctl directly, e.g. +synctl start instead of ./synctl start or /path/to/synctl start.

You will need to ensure synctl is on your PATH.