diff options
author | reivilibre <oliverw@matrix.org> | 2022-05-26 12:19:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 11:19:01 +0000 |
commit | e76864436867deba7fc6b740d1f8d80f4717f44b (patch) | |
tree | 4e8b442437eed7dfa3fb55cefbfc9b2d293bebab | |
parent | Remove unstable APIs for /hierarchy. (#12851) (diff) | |
download | synapse-e76864436867deba7fc6b740d1f8d80f4717f44b.tar.xz |
Fix ambiguous column name that would prevent use of MSC2716 History Import when using Postgres as a database. (#12843)
-rw-r--r-- | changelog.d/12843.bugfix | 1 | ||||
-rw-r--r-- | synapse/storage/databases/main/event_federation.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/12843.bugfix b/changelog.d/12843.bugfix new file mode 100644 index 0000000000..f87c0799a0 --- /dev/null +++ b/changelog.d/12843.bugfix @@ -0,0 +1 @@ +Fix bug where servers using a Postgres database would fail to backfill from an insertion event when MSC2716 is enabled (`experimental_features.msc2716_enabled`). diff --git a/synapse/storage/databases/main/event_federation.py b/synapse/storage/databases/main/event_federation.py index dcfe8caf47..562dcbe94d 100644 --- a/synapse/storage/databases/main/event_federation.py +++ b/synapse/storage/databases/main/event_federation.py @@ -1057,7 +1057,7 @@ class EventFederationWorkerStore(SignatureWorkerStore, EventsWorkerStore, SQLBas INNER JOIN batch_events AS c ON i.next_batch_id = c.batch_id /* Get the depth of the batch start event from the events table */ - INNER JOIN events AS e USING (event_id) + INNER JOIN events AS e ON c.event_id = e.event_id /* Find an insertion event which matches the given event_id */ WHERE i.event_id = ? LIMIT ? |