This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
synapse_port_db generates an unusable database #9979
Copy link
Copy link
Closed
Labels
S-MajorMajor functionality / product severely impaired, no satisfactory workaround.Major functionality / product severely impaired, no satisfactory workaround.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Description
After running synapse_port_db
following the instructions, attempting to start synapse pointing to the generated database results in an error along the lines of:
2021-05-13 17:48:23,671 - synapse.storage.util.sequence - 173 - WARNING - main - Postgres sequence event_auth_chain_id is behind table event_auth_chains: 224 < 225
2021-05-13 17:48:23,671 - twisted - 258 - ERROR - main - *******************************************************************************
2021-05-13 17:48:23,671 - twisted - 258 - ERROR - main -
2021-05-13 17:48:23,671 - twisted - 258 - ERROR - main - Postgres sequence 'event_auth_chain_id' is inconsistent with associated
2021-05-13 17:48:23,672 - twisted - 258 - ERROR - main - table 'event_auth_chains'. This can happen if Synapse has been downgraded and
2021-05-13 17:48:23,672 - twisted - 258 - ERROR - main - then upgraded again, or due to a bad migration.
2021-05-13 17:48:23,672 - twisted - 258 - ERROR - main -
2021-05-13 17:48:23,672 - twisted - 258 - ERROR - main - To fix this error, shut down Synapse (including any and all workers)
2021-05-13 17:48:23,672 - twisted - 258 - ERROR - main - and run the following SQL:
2021-05-13 17:48:23,672 - twisted - 258 - ERROR - main -
2021-05-13 17:48:23,672 - twisted - 258 - ERROR - main - SELECT setval('event_auth_chain_id', (
2021-05-13 17:48:23,672 - twisted - 258 - ERROR - main - SELECT GREATEST(MAX(chain_id), 0) FROM event_auth_chains
2021-05-13 17:48:23,673 - twisted - 258 - ERROR - main - ));
2021-05-13 17:48:23,673 - twisted - 258 - ERROR - main -
2021-05-13 17:48:23,673 - twisted - 258 - ERROR - main - See docs/postgres.md for more information.
2021-05-13 17:48:23,673 - twisted - 258 - ERROR - main -
2021-05-13 17:48:23,673 - twisted - 258 - ERROR - main - *******************************************************************************
(attempting to re-run synapse_port_db
produces a similar error)
manuke42
Metadata
Metadata
Assignees
Labels
S-MajorMajor functionality / product severely impaired, no satisfactory workaround.Major functionality / product severely impaired, no satisfactory workaround.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.