aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/postgres
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-04-15 14:39:27 +0100
committerGitHub <noreply@github.com>2020-04-15 14:39:27 +0100
commit7b3edf4622fa562a0d8b42c1ac845b88722374f0 (patch)
treee9e720a33cf5266ca497ff057094bd4e2222c26f /syncapi/storage/postgres
parent895a72b6eecf7a7e71770bfaede53cd51f7c91e1 (diff)
Tweaks to backfill (#964)
Diffstat (limited to 'syncapi/storage/postgres')
-rw-r--r--syncapi/storage/postgres/backward_extremities_table.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/syncapi/storage/postgres/backward_extremities_table.go b/syncapi/storage/postgres/backward_extremities_table.go
index b3ee28e0..cb362964 100644
--- a/syncapi/storage/postgres/backward_extremities_table.go
+++ b/syncapi/storage/postgres/backward_extremities_table.go
@@ -60,7 +60,7 @@ const insertBackwardExtremitySQL = "" +
" ON CONFLICT DO NOTHING"
const selectBackwardExtremitiesForRoomSQL = "" +
- "SELECT event_id FROM syncapi_backward_extremities WHERE room_id = $1"
+ "SELECT DISTINCT event_id FROM syncapi_backward_extremities WHERE room_id = $1"
const deleteBackwardExtremitySQL = "" +
"DELETE FROM syncapi_backward_extremities WHERE room_id = $1 AND prev_event_id = $2"