Users, who upgraded OS from RHEL7/CENTOS7 to RHEL8, may see following warnings:
WARNING: database "phantom" has a collation version mismatch
DETAIL: The database was created using collation version 2.17, but the operating system provides version 2.28.
HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE phantom REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.WARNING: database "postgres" has a collation version mismatch
DETAIL: The database was created using collation version 2.17, but the operating system provides version 2.28.
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.The warning users are seeing indicates that there is a mismatch between the collation version used by PostgreSQL databases and the version provided by the operating system after the upgrade.
Users can run following commands one by one to solve the issue:
psql -h /tmp -p 6432 -d postgres -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;"
psql -h /tmp -p 6432 -d postgres -c "REINDEX DATABASE postgres;"
psql -h /tmp -p 6432 -d phantom -c "ALTER DATABASE phantom REFRESH COLLATION VERSION;"
psql -h /tmp -p 6432 -d phantom -c "REINDEX DATABASE phantom;"
Note1: reindexing can take time, especially for larger databases or indexes with a significant amount of data. Please do NOT terminate the process forcefully.
Note2: for warm standby pair, users only need to run the commands on the primary instance.
| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
29-Sep-2026
|
Initial Release |