-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Warning about incorrect database collation/ctype should have a link on how to fix it #6831
Comments
I'm sure you read https://github.com/matrix-org/synapse/blob/develop/UPGRADE.rst#upgrading-to-v1100 carefully? |
Can i work on this? |
If you like, sure. |
Not carefully, but did skim it and thought it would be fine. Updated Synapse, restarted, got the message, opened the issue. A bit of goldfish brain ._. https://github.com/matrix-org/synapse/blob/develop/docs/postgres.md#fixing-incorrect-collate-or-ctype was the thing I was looking for |
Should i add https://github.com/matrix-org/synapse/blob/develop/docs/postgres.md#fixing-incorrect-collate-or-ctype to the warning. I have just added docs/postgres.md |
Looking for first issues. I assume this should be closed? |
Looks like it, yea |
Sorry for bumping but upgrading an Unfortunately I'm not enough advanced to solve the problem with the information provided by https://matrix-org.github.io/synapse/latest/postgres.html#fixing-incorrect-collate-or-ctype ("dump the database and recreate it with the correct locale parameter (as shown above)"). |
I don't have an explicit command for you, but here are some clues:
I'd suggest:
For more advice, I think your best bet would be the #synapse-admins:matrix.org room. |
Here is a "walkthrough" for others who had to do such a fix for the first time. It is not exactly what @DMRobertson suggested but it worked for me: How to fix incorrect database collation/ctype for upgrade to Synapse 1.56.0Check the Synapse database statusExample for right collation/ctype
Because the SQL query lists "C" for column "Collate" and "Ctype" in the row "synapse" there is nothing to fix! Example for wrong collation/ctype
Because the SQL query lists not "C" for "Collate" and column "Ctype" in the row "synapse" you need to recreate the database with correct C type. Fix the Synapse databaseStop Synapse
(and other processes accessing the Synapse database) Backup the Synapse databaseCheck size of the Synapse databse:
As
Delete the Synapse databaseAs user
Example:
Recreate the Synapse databaseAs user
Example:
Import the dump of the old Synapse database to the new created synapse databaseAs user
Example:
The sizes listed by |
you should create the database with the proper definition psql -U postgres
CREATE DATABASE synapse WITH LC_CTYPE = 'C' LC_COLLATE='C' TEMPLATE='template0'; |
These unfortunately don't say how I should be fixing it :(
The text was updated successfully, but these errors were encountered: