📖 ~1 min read
Table of contents
Symptom & Impact
PostgreSQL warns about glibc collation version mismatch after a CentOS Stream upgrade.
Environment & Reproduction
Major glibc bumps change collation ordering for some locales.
psql -V
ldd --version | head -1
Root Cause Analysis
Indexes built on the old collation may produce wrong results until rebuilt.
Quick Triage
Identify databases and indexes that depend on collation.
psql -c "l+"
psql -c "SELECT collname, collversion FROM pg_collation;"
Step-by-Step Diagnosis
Refresh collation versions in pg_catalog.
psql -c "ALTER DATABASE template1 REFRESH COLLATION VERSION;"

Solution – Primary Fix
Reindex affected databases to rebuild with current collation.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
reindexdb --all --concurrently

Solution – Alternative Approaches
Dump and restore as a clean alternative for small DBs.
pg_dumpall > /var/backups/all.sql
psql -f /var/backups/all.sql
Verification & Acceptance Criteria
No collation warnings on startup; queries return expected order.
psql -c 'SHOW server_version' && journalctl -u postgresql -n 50 --no-pager
Rollback Plan
Restore the prior data directory snapshot if reindex breaks something.
systemctl stop postgresql && rsync -a /var/lib/pgsql.bak/ /var/lib/pgsql/
Prevention & Hardening
Run reindex after every glibc upgrade.
ansible -m shell -a 'reindexdb --all --concurrently' dbservers
Related Errors & Cross-Refs
Wrong query order, duplicate-key on indexes, collation mismatch warnings.
Related tutorial: View the step-by-step tutorial for centos-stream-10.
View all centos-stream-10 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
PostgreSQL release notes, glibc collation notes.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.