Resolve postgres collation Mismatch

FRANCIS GITHAEFRANCIS GITHAE
1 min read
  • I encountered this issue after upgrading from fedora 38 to 40

    WARNING: database "template1" has a collation version mismatch DETAIL: The database was created using collation version 2.37, but the operating system provides version 2.39.

Solution

  1. connect to the specific database showing the error. In most cases all the databases,

  2. reindex the database

  3. refresh the collation

/c database1
> REINDEX DATABASE database1;
>  ALTER DATABASE database1 REFRESH COLLATION VERSION;
0
Subscribe to my newsletter

Read articles from FRANCIS GITHAE directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

FRANCIS GITHAE
FRANCIS GITHAE