Skip to content

Postgres collation version mismatch #7130

Open

Description

@cf-mp

Describe the bug
On start-up of the Postgres server there are Postgres errors reporting collation version mismatches. These errors also continue to show up as queries are made to the Postgres server and they also show up in the application server.

To Reproduce
Steps to reproduce the behavior:

  1. Start Manyfold
  2. Check Postgres logs

Expected behavior
To not see the collation version errors

Screenshots

2026-09-18 15:16:17.788 UTC [125] WARNING:  database "postgres" has a collation version mismatch
2026-09-18 15:16:17.788 UTC [125] DETAIL:  The database was created using collation version 2.36, but the operating system provides version 2.41.
2026-09-18 15:16:17.788 UTC [125] HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE postgres REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
2026-09-18 15:16:37.898 UTC [126] WARNING:  database "template1" has a collation version mismatch
2026-09-18 15:16:37.898 UTC [126] DETAIL:  The database was created using collation version 2.36, but the operating system provides version 2.41.
2026-09-18 15:16:37.898 UTC [126] HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE template1 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
2026-09-18 15:16:57.751 UTC [127] WARNING:  database "manyfold" has a collation version mismatch
2026-09-18 15:16:57.751 UTC [127] DETAIL:  The database was created using collation version 2.36, but the operating system provides version 2.41.
2026-09-18 15:16:57.751 UTC [127] HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE manyfold REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.

Additional context
Add any other context about the problem here.

Manyfold is the latest 0.149 release. It is running configured via Portainer running under Docker version 29.8.1 on an Ubuntu 24.04.5 LTS Virtual Machine. Please let me know if I can get any other details for you. Thanks

Activity

  1. Floppy commented on Sep 18, 2026

    @Floppy
    Collaborator

    This often happens when you upgrade the postgres version; has that changed recently?

  2. cf-mp commented on Sep 18, 2026

    @cf-mp
    Author

    I do not run an external Postgres server, only what is bundled in as of the compose file.

      postgres-server:
        image: postgres:15
        volumes:
          - /home/manyfold/postgresql:/var/lib/postgresql/data
        environment:
          POSTGRES_USER: manyfold
          POSTGRES_PASSWORD: removed
        restart: unless-stopped
        networks:
          - manyfold
    

    Looks like the current version it is running is 15.19-1.pgdg13+2

    Thanks!

  3. cf-mp commented on Sep 21, 2026

    @cf-mp
    Author

    I ended up manually reindexing each of the DBs and it seems to be good now. What should be the best way going forward to manage this? Currently the recommended docker compose file has it pinned to postgres:15 which has about a year of support left. Wondering if you have plans to move to a newer version at some point and if so, is there a way to automatically force a reindex when manyfold sees Postgres has updated to a newer version? Thanks

    for db in manyfold postgres template1; do
      docker exec -it manyfold-postgres-server-1 psql -U manyfold -d $db -c "REINDEX DATABASE $db;"
      docker exec -it manyfold-postgres-server-1 psql -U manyfold -d $db -c "ALTER DATABASE $db REFRESH COLLATION VERSION;"
    done
    
  4. Floppy commented on Sep 21, 2026

    @Floppy
    Collaborator

    The postgres version in the docker compose example is just that, an example - Manyfold doesn't manage the postgres install and can't update it. But, there's probably a few things I should do to improve the situation, because a few people will be in the same boat:

    1. Update the example compose file to a newer postgres version
    2. Write some instructions for upgrading the database
    3. Add a CLI or startup job to run that reindex/refresh command

    The same instructions will be needed for MySQL/MariaDB as well.

    Glad you got yours sorted, I'll use what you've put here to improve the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions