Hi there,
I’m trying to restore a postgres snapshot but I’m getting collations mismatch issues:
2024-05-31T23:11:31.072 app[e2867512c76618] sjc [info] postgres | 2024-05-31 23:11:31.072 UTC [594] ERROR: template database "template1" has a collation version mismatch
2024-05-31T23:11:31.072 app[e2867512c76618] sjc [info] postgres | 2024-05-31 23:11:31.072 UTC [594] DETAIL: The template database was created using collation version 2.31, but the operating system provides version 2.36.
2024-05-31T23:11:31.072 app[e2867512c76618] sjc [info] postgres | 2024-05-31 23:11:31.072 UTC [594] HINT: Rebuild all objects in the template database that use the default collation and run ALTER DATABASE template1 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
2024-05-31T23:11:31.072 app[e2867512c76618] sjc [info] postgres | 2024-05-31 23:11:31.072 UTC [594] STATEMENT: CREATE DATABASE repmgr OWNER repmgr;
2024-05-31T23:11:31.073 app[e2867512c76618] sjc [info] failed post-init: failed to enable repmgr: failed to create repmgr database: ERROR: template database "template1" has a collation version mismatch (SQLSTATE XX000). Retrying...
I’ve tried different images with no success.
The steps described at postgres-flex: database "postgres" has a collation version mismatch do not help since I cannot connect to the database.
How can I properly use a postgres snapshot?