From 8340906573fe9f1cae00994cb1ca82936b0bab0e Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 18 Nov 2022 20:57:15 -0600 Subject: [PATCH] Add suspicion --- synapse/storage/databases/state/bg_updates.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/synapse/storage/databases/state/bg_updates.py b/synapse/storage/databases/state/bg_updates.py index a7fcc564a9..224bebf3bf 100644 --- a/synapse/storage/databases/state/bg_updates.py +++ b/synapse/storage/databases/state/bg_updates.py @@ -101,9 +101,11 @@ class StateGroupBackgroundUpdateStore(SQLBaseStore): where_clause = " AND (%s)" % (where_clause,) if isinstance(self.database_engine, PostgresEngine): + # Suspicion start # Temporarily disable sequential scans in this transaction. This is # a temporary hack until we can add the right indices in txn.execute("SET LOCAL enable_seqscan=off") + # Suspicion end # The below query walks the state_group tree so that the "state" # table includes all state_groups in the tree. It then joins