Collation checker warns about default collation

After recent upgrade from Debian 11 to 12 and GitLab CE 17.11.4 to 18.4.1 the new collation checker warns about mismatches for the default collation.

I, [2025-10-01T17:11:54.747358 #20276]  INFO -- : Checking for PostgreSQL collation mismatches on main database...
W, [2025-10-01T17:11:54.754172 #20276]  WARN -- : Collation mismatches detected on main database!
W, [2025-10-01T17:11:54.754219 #20276]  WARN -- : 1 collation(s) have version mismatches:
W, [2025-10-01T17:11:54.754234 #20276]  WARN -- :   - default: stored=, actual=2.36
I, [2025-10-01T17:11:54.754248 #20276]  INFO -- : Found 10 indexes to corruption spot check.
I, [2025-10-01T17:11:54.776014 #20276]  INFO -- : No corrupted indexes detected.
I, [2025-10-01T17:11:54.777066 #20276]  INFO -- : Checking for PostgreSQL collation mismatches on ci database...
W, [2025-10-01T17:11:54.781494 #20276]  WARN -- : Collation mismatches detected on ci database!
W, [2025-10-01T17:11:54.781537 #20276]  WARN -- : 1 collation(s) have version mismatches:
W, [2025-10-01T17:11:54.781552 #20276]  WARN -- :   - default: stored=, actual=2.36
I, [2025-10-01T17:11:54.781559 #20276]  INFO -- : Found 0 indexes to corruption spot check.
I, [2025-10-01T17:11:54.781563 #20276]  INFO -- : No indexes found for corruption spot check.

Databases look like this:

gitlabhq_production=# \l
                                                                   List of databases
        Name         |    Owner    | Encoding | Locale Provider |   Collate   |    Ctype    | ICU Locale | ICU Rules |        Access privileges
---------------------+-------------+----------+-----------------+-------------+-------------+------------+-----------+---------------------------------
 gitlabhq_production | gitlab      | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |            |           |
 postgres            | gitlab-psql | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |            |           |
 registry            | registry    | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |            |           |
 template0           | gitlab-psql | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |            |           | =c/"gitlab-psql"               +
                     |             |          |                 |             |             |            |           | "gitlab-psql"=CTc/"gitlab-psql"
 template1           | gitlab-psql | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |            |           | "gitlab-psql"=CTc/"gitlab-psql"+
                     |             |          |                 |             |             |            |           | =c/"gitlab-psql"
(5 rows)

I’ve tried all the collation refresh commands possible and rebuilt the indices, both ALTER COLLATION ... and ALTER DATABASE ... as suggested in Upgrading operating systems for PostgreSQL | GitLab Docs

Not sure if relevant: The issue only appeared on a system where en_US.UTF-8 was chosen as locale two other systems with C.UTF-8 there is no warning.

The default collation on every system looks identical


gitlabhq_production=# select * from pg_collation;
  oid  |        collname        | collnamespace | collowner | collprovider | collisdeterministic | collencoding | collcollate | collctype  |  colliculocale   | collicurules | collversion
-------+------------------------+---------------+-----------+--------------+---------------------+--------------+-------------+------------+------------------+--------------+-------------
   100 | default                |            11 |        10 | d            | t                   |           -1 |             |            |                  |              |

Anyone an idea how to resolve the warnings oder this is an issue in the checker?

Nobody an idea how to fix this?

The collation information is not important. It even says on the screen:

so nothing to worry about. I also get it on some of my installations. In reality it would have been better if Gitlab didn’t include this. Either they should display information that is correct, or just don’t display it at all if it may or may not be a problem.

So, don’t worry about it.

Suggest adding feedback to Database diagnostics page: Feedback issue (#567561) · Issues · GitLab.org / GitLab · GitLab Thanks!