Affected versions: CentOS Stream 10

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

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;"
Illustrative mockup for centos-stream-10 — pg_collation_warn
Collation warning at startup — Illustrative mockup — Progressive Robot

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
Illustrative mockup for centos-stream-10 — pg_reindex_ok
Indexes rebuilt — Illustrative mockup — Progressive Robot

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

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.