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

Unique constraints seem to be disappearing from the database #7417

Closed
babolivier opened this issue May 5, 2020 · 2 comments
Closed

Unique constraints seem to be disappearing from the database #7417

babolivier opened this issue May 5, 2020 · 2 comments
Labels
z-bug (Deprecated Label) z-p2 (Deprecated Label)

Comments

@babolivier
Copy link
Contributor

#7399 and #7416 both look like a different unique constraint suddenly disappeared from their database (respectively account_data_uniqueness and device_uniqueness).

This doesn't seem to be related to sqlite -> postgres migrations, and both these constraints are added during table creation, outside of a background update, so it's not clear to me how this could happen.

@babolivier babolivier added z-bug (Deprecated Label) p1 z-p2 (Deprecated Label) and removed p1 labels May 5, 2020
@richvdh
Copy link
Member

richvdh commented May 5, 2020

I've seen this reported before (eg #7282, #7309). On investigation it usually turns out to have happened when people back up and restore their database. If you have duplicate rows due to incorrect collation settings (#6696 etc), then it will not be possible to create the index on the restored database, hence the "missing" index.

@babolivier
Copy link
Contributor Author

Right, so it's more likely an operational/PostgreSQL issue than a Synapse one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-bug (Deprecated Label) z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

2 participants