Sorting Out glibc Collation Challenges: Joe Conway - PGCon 2023

Postgres database administrators must navigate glibc collation challenges to avoid compatibility issues. Learn how to lock down a specific minor version, create a customized glibc, and rebuild Postgres to ensure query performance and data integrity.

Key takeaways
  • Sorting out glibc collation challenges is a must for Postgres database administrators.
  • Lock down to a specific minor version of GLibC to avoid compatibility issues.
  • The recommended version for Postgres is glibc 2.17, but if you’re going from an older version (glibc < 2.28) to a newer version (glibc ≥ 2.28), you may experience collation issues.
  • Changes in glibc can cause problems with collation order, which can affect query performance and data integrity.
  • The problem is not limited to Postgres, but it can impact other distributed systems.
  • If you’re going from an older version of glibc to a newer version, you’ll need to rebuild Postgres with the new glibc version.
  • Rebuilding Postgres can be complex and time-consuming, especially if you’re dealing with a large database.
  • The solution is to create a customized glibc version that includes the necessary locale data and symbols.
  • Using a preload library can help alleviate the problem, but it may not resolve all issues.
  • The solution is not part of the standard build process and requires manual modifications to the build files and sources.
  • The impact of this problem can be severe, causing data corruption and performance issues.
  • The recommended approach is to create a custom glibc version that is compatible with the target system.
  • There is no one-size-fits-all solution, and the approach will depend on the specific system and database configuration.
  • It’s essential to understand the underlying issues and the impact of changes to the glibc version.
  • The problem can be complex and requires expert knowledge of glibc and Postgres.