Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit e768644

Browse files
authored
Fix ambiguous column name that would prevent use of MSC2716 History Import when using Postgres as a database. (#12843)
1 parent 1885ee0 commit e768644

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/12843.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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`).

synapse/storage/databases/main/event_federation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ def _get_connected_batch_event_backfill_results_txn(
10571057
INNER JOIN batch_events AS c
10581058
ON i.next_batch_id = c.batch_id
10591059
/* Get the depth of the batch start event from the events table */
1060-
INNER JOIN events AS e USING (event_id)
1060+
INNER JOIN events AS e ON c.event_id = e.event_id
10611061
/* Find an insertion event which matches the given event_id */
10621062
WHERE i.event_id = ?
10631063
LIMIT ?

0 commit comments

Comments
 (0)