summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/storage/databases/main/events_forward_extremities.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/events_forward_extremities.py b/synapse/storage/databases/main/events_forward_extremities.py
index 84aaa919fb..68b64838bb 100644
--- a/synapse/storage/databases/main/events_forward_extremities.py
+++ b/synapse/storage/databases/main/events_forward_extremities.py
@@ -88,8 +88,8 @@ class EventForwardExtremitiesStore(SQLBaseStore):
             sql = """
                 SELECT event_id, state_group, depth, received_ts
                 FROM event_forward_extremities
-                NATURAL JOIN event_to_state_groups
-                NATURAL JOIN events
+                INNER JOIN event_to_state_groups USING (event_id)
+                INNER JOIN events INNER JOIN USING (event_id)
                 WHERE room_id = ?
             """