Database Collation verison mismatch

Hello! Since a few weeks back, (I am not sure in which server update) we are getting this warning in our ayon vm logs:

database 'ayon' has a collation version mismatch
the database was created using collation version 2.36 but the operating system provides version 2.41
rebuild all objects in this database that use the default collation and run ALTER DATABASE ayon REFRESH COLLATION VERSION or build PostgreSQL with the right library version

Do you have any recommended procedure to deal with this? I cannot find anything in the forums and discord

Thank you!

I have exactly the same warning. It appears every 5 seconds, so the logs are full with this.
My server : 1.13.10+202601270842

1 Like

The solution would be:

Run ALTER DATABASE ayon REFRESH COLLATION VERSION; in the postgres shell.
It is completely normal and it happens when you pull a newer postgres image.

Essentially what the logged message prescribes to do.

Thanks.

Not sure how to execute it, maybe like this ? :

docker compose exec postgres psql -U ayon ayon -c “ALTER DATABASE ayon REFRESH COLLATION VERSION;”

Ah, I can do this :

powershell.exe -executionpolicy bypass -file ./manage.ps1 dbshell

Then I typed this :
ALTER DATABASE ayon REFRESH COLLATION VERSION;

It replied this :
NOTICE: changing version from 2.36 to 2.41
ALTER DATABASE

2 Likes

I know you figured it but just for completeness in case someone is looking for a step-by-step guide, this can be done using dbshell in ayon-docker director. There’s an example on docs.

2 Likes

Thank you guys, I did that, and it was fairly straight forward, I thought it would take longer but it was instant.

Happy Wednesday,