From 55be6cda3f942b4f0c92ecfa4659c4a2ffb92cb9 Mon Sep 17 00:00:00 2001
From: sandhose
host all all ::1/128 ident
COLLATE
or CTYPE
Synapse will refuse to set up a new database if it has the wrong values of
-COLLATE
and CTYPE
set. Synapse will also refuse to start an existing database with incorrect values
-of COLLATE
and CTYPE
unless the config flag allow_unsafe_locale
, found in the
-database
section of the config, is set to true. Using different locales can cause issues if the locale library is updated from
-underneath the database, or if a different version of the locale is used on any
-replicas.
Synapse will refuse to start when using a database with incorrect values of
+COLLATE
and CTYPE
unless the config flag allow_unsafe_locale
, found in the
+database
section of the config, is set to true. Using different locales can
+cause issues if the locale library is updated from underneath the database, or
+if a different version of the locale is used on any replicas.
If you have a database with an unsafe locale, the safest way to fix the issue is to dump the database and recreate it with
the correct locale parameter (as shown above). It is also possible to change the
parameters on a live database and run a REINDEX
on the entire database,
however extreme care must be taken to avoid database corruption.
Note that the above may fail with an error about duplicate rows if corruption has already occurred, and such duplicate rows will need to be manually removed.
-Synapse uses Postgres sequences to generate IDs for various tables. A sequence -and associated table can get out of sync if, for example, Synapse has been -downgraded and then upgraded again.
-To fix the issue shut down Synapse (including any and all workers) and run the -SQL command included in the error message. Once done Synapse should start -successfully.
-- cgit 1.5.1