summary refs log tree commit diff
path: root/changelog.d/10359.bugfix
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-07-15 16:02:12 +0100
committerGitHub <noreply@github.com>2021-07-15 16:02:12 +0100
commit3acf85c85f62655077f8c4b466389de4a4183604 (patch)
treebeae5e7d0633a3c19ad0f3a970d138723b68f47f /changelog.d/10359.bugfix
parentMerge branch 'master' into develop (diff)
downloadsynapse-3acf85c85f62655077f8c4b466389de4a4183604.tar.xz
Reduce likelihood of Postgres table scanning `state_groups_state`. (#10359)
The postgres statistics collector sometimes massively underestimates the
number of distinct state groups are in the `state_groups_state`, which
can cause postgres to use table scans for queries for multiple state
groups.

We fix this by manually setting `n_distinct` on the column.
Diffstat (limited to 'changelog.d/10359.bugfix')
-rw-r--r--changelog.d/10359.bugfix1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/10359.bugfix b/changelog.d/10359.bugfix
new file mode 100644
index 0000000000..d318f8fa08
--- /dev/null
+++ b/changelog.d/10359.bugfix
@@ -0,0 +1 @@
+Fix PostgreSQL sometimes using table scans for queries against `state_groups_state` table, taking a long time and a large amount of IO.