summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-07-06 11:00:05 +0100
committerGitHub <noreply@github.com>2021-07-06 11:00:05 +0100
commitd7a94a7dcc955e08bf6bc62b95e02965b304af7f (patch)
tree2de5a5e44929f5f53c189ffe2160e56e7cfb9c5e
parentAdd support for evicting cache entries based on last access time. (#10205) (diff)
downloadsynapse-d7a94a7dcc955e08bf6bc62b95e02965b304af7f.tar.xz
Add upgrade notes about disk space for events migration (#10314)
Diffstat (limited to '')
-rw-r--r--CHANGES.md4
-rw-r--r--changelog.d/10314.bugfix1
-rw-r--r--docs/upgrade.md40
3 files changed, 44 insertions, 1 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 0c64d5bda6..a2fc423096 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,7 @@
+Synapse 1.38.0 (**UNRELEASED**)
+===============================
+This release includes a database schema update which could result in elevated disk usage. See the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade.md#upgrading-to-v1380) for more information.
+
 Synapse 1.37.1 (2021-06-30)
 ===========================
 
diff --git a/changelog.d/10314.bugfix b/changelog.d/10314.bugfix
new file mode 100644
index 0000000000..7ebda7cdc2
--- /dev/null
+++ b/changelog.d/10314.bugfix
@@ -0,0 +1 @@
+Fix a long-standing bug where Synapse would return errors after 2<sup>31</sup> events were handled by the server.
diff --git a/docs/upgrade.md b/docs/upgrade.md
index a44960c2b8..011aadf638 100644
--- a/docs/upgrade.md
+++ b/docs/upgrade.md
@@ -84,7 +84,45 @@ process, for example:
     wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
     dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
     ```
-    
+
+
+# Upgrading to v1.38.0
+
+## Re-indexing of `events` table on Postgres databases
+
+This release includes a database schema update which requires re-indexing one of
+the larger tables in the database, `events`. This could result in increased
+disk I/O for several hours or days after upgrading while the migration
+completes. Furthermore, because we have to keep the old indexes until the new
+indexes are ready, it could result in a significant, temporary, increase in
+disk space.
+
+To get a rough idea of the disk space required, check the current size of one
+of the indexes. For example, from a `psql` shell, run the following sql:
+
+```sql
+SELECT pg_size_pretty(pg_relation_size('events_order_room'));
+```
+
+We need to rebuild **four** indexes, so you will need to multiply this result
+by four to give an estimate of the disk space required. For example, on one
+particular server:
+
+```
+synapse=# select pg_size_pretty(pg_relation_size('events_order_room'));
+ pg_size_pretty
+----------------
+ 288 MB
+(1 row)
+```
+
+On this server, it would be wise to ensure that at least 1152MB are free.
+
+The additional disk space will be freed once the migration completes.
+
+SQLite databases are unaffected by this change.
+
+
 # Upgrading to v1.37.0
 
 ## Deprecation of the current spam checker interface