Skip to content

Migrate PostgreSQL to C.UTF-8

C.UTF-8 is installed by default, so we can avoid messing with locale-gen by using that.

All the postgres servers (excluding matrix due to[1]) have been migrated with the following commands:
# sudo -u postgres pg_dumpall > d
# sed "s/LOCALE = 'C'/LOCALE = 'C.UTF-8'/" -i d
# systemctl stop postgresql.service
# mv /var/lib/postgres/data{,.old}
$ ansible-playbook --diff -t postgres playbooks/.yml
# sudo -u postgres psql < d

[1] https://github.com/matrix-org/synapse/blob/19a57f4a3710d6c3f7cc9d031e0e59bc2ed3b052/docs/postgres.md#fixing-incorrect-collate-or-ctype

Fix #470 (closed)

Edited by Kristian Klausen

Merge request reports