Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Abort startup if unsafe DB locale #12055

@JanZerebecki

Description

@JanZerebecki

Description

From #10718 :

Perhaps instead of a warning that should be made to abort startup unless a new setting corrup_my_db_silently_on_libc_update: true is set.

We're fine going with this approach to at least help people avoid silent corruption... details tbd.

We should probably also add the commands needed to drop the broken data from a DB to https://matrix-org.github.io/synapse/latest/postgres.html#fixing-incorrect-collate-or-ctype and also add:

We should also probably link to information on how Glibc collation changes can break PostgreSQL. E.g., https://wiki.postgresql.org/wiki/Locale_data_changes

Steps to reproduce

  • have DB use wrong locale
  • update libc with locale change
  • notice corrupt DB

Version information

  • Version: seen e.g. on 1.41.0, but bug exists before and after

  • Install method: any

  • Platform: Linux glibc

Metadata

Metadata

Assignees

Labels

T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions