Commit 460200e
committed
teach synapse_port_db about new sequences
This makes sure we that the port script sets up the
"application_services_txns" sequence (matrix-org#12209). and the
"un_partial_stated_event_stream_sequence" sequence (matrix-org#14545), which fixes
errors like the one below from appearing when trying to connect to the
postgresql database after running the script:
Postgres sequence 'application_services_txn_id_seq' is inconsistent with associated
table 'application_services_txns'. This can happen if Synapse has been downgraded and
then upgraded again, or due to a bad migration.
To fix this error, shut down Synapse (including any and all workers)
and run the following SQL:
SELECT setval('application_services_txn_id_seq', (
SELECT GREATEST(MAX(txn_id), 0) FROM application_services_txns
));
See docs/postgres.md for more information.
Signed-off-by: Guacamolie <[email protected]>1 parent 19796e2 commit 460200e
1 file changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
769 | 769 | | |
770 | 770 | | |
771 | 771 | | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
772 | 776 | | |
773 | 777 | | |
774 | 778 | | |
| |||
779 | 783 | | |
780 | 784 | | |
781 | 785 | | |
| 786 | + | |
782 | 787 | | |
783 | 788 | | |
784 | 789 | | |
| |||
1133 | 1138 | | |
1134 | 1139 | | |
1135 | 1140 | | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
1136 | 1162 | | |
1137 | 1163 | | |
1138 | 1164 | | |
| |||
0 commit comments