-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
psycopg2.errors.DuplicateObject: constraint "event_push_actions_thread_id" for relation "event_push_actions" already exists #15741
Comments
UpdateThis appears to be the result of a partial installation that failed, possibly due to a setup issue specific to my dev environment. This issue was resolved by manually updating the database, removing the following constraints from the relevant tables: -
and then re-running the upgrade, which then worked normally. |
@smonksi is it possible that you ran Synapse from the |
@erikjohnston Yes, I did run from both the release and the develop branches. However my attempt with |
Weird, I'm not seeing any release (or release candidate) that adds the I'm going to close this for now, since you've fixed your deployment, but if anyone else sees this then please shout. |
Ok @erikjohnston, if I can throw any more more light on it, I'll update here. |
Thanks for filing the issue! |
No problem! |
I also saw this locally on my developer copy of Synapse. Since I don't care about my data there, I just ran these commands and started Synapse again (manually poking your database comes with no warranties): $ psql --user postgres synapse
> ALTER TABLE event_push_actions DROP CONSTRAINT event_push_actions_thread_id;
> ALTER TABLE event_push_actions_staging DROP CONSTRAINT event_push_actions_staging_thread_id;
> ALTER TABLE event_push_summary DROP CONSTRAINT event_push_summary_thread_id;
> \q |
I had the same issue using the docker containers from the github, this fixed my issue. |
Description
When upgrading today (June 07) from synapse 1.83 to 1.85.1, synapse fails to start with the error
psycopg2.errors.DuplicateObject: constraint "event_push_actions_thread_id" for relation "event_push_actions" already exists
If I configure for a clean install, i.e. a completely new database, the upgrade functions normally, but obviously minus all data.
Steps to reproduce
upgrade to 1.85 via git pull
Bug exists both on develop branch and on release branch release-v1.85
Homeserver
scaramellow.co.uk (currently down)
Synapse Version
1.85.1
Installation Method
Other (please mention below)
Database
Postgres version (14+238), native installation
Workers
I don't know
Platform
Installation using source code (vscode IDE)
Running both using poetry command and using vscode (via venv for debugging)
Configuration
Ubuntu 22.04 LTS
Source code
Relevant log output
Anything else that would be useful to know?
Possibly related to #15736
The text was updated successfully, but these errors were encountered: