Failing to receive group messages after postgres upgrade (14 to 16)
BastianLo opened this issue · 1 comments
I have my synapse, matrix-wa and postgres set up in docker.
I upgraded postgres from 14 to 16.3 by dumping the data with pg_dump, upgrading the db and re-adding the dumped data.
Since this upgrade, I fail to receive group messages. Private messages still work fine.
Once I receive a group message, mautrix-wa prints out the following error:
ERR Failed to send WhatsApp message to Matrix error="failed to ensure joined: failed to update state store: pq: there is no unique or exclusion constraint matching the ON CONFLICT specification" action="handle whatsapp event" ...
I found the problem.
The table "mx_user_profile" was missing a unique constraint ("mx_user_profile_room_user_unique").
This issue was probably caused by the database migration.
By creating the constraint, everything is now working fine again.