lc_collate
Fact — official short description: “Shows the collation order locale.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–15 |
| Removed in | PG16 |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–15 | C |
— | C |
How it works
Reported the current database’s collation locale through PG15. It was an internal read-only value, not a configurable GUC, and PostgreSQL 16 removed it from pg_settings.
The collation locale is selected when a database is created and can differ between databases in one cluster. It affects ordering and comparison semantics; changing the server configuration cannot rewrite existing indexes or database locale metadata.
On PG16 and later, monitoring and applications should read the current database row in pg_database and its locale-provider-specific metadata, and use pg_collation for individual collation objects. Test collation-version changes separately from this removed reporter.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Not tunable. Replace SHOW/current_setting readers with a version-aware pg_database query, and regression-test indexed ordering and uniqueness when moving databases between locale providers or versions. |
| OLAP | Record per-database provider and locale beside analytical exports. A desired collation change requires a deliberate database/object migration and possible REINDEX, not a GUC edit. |
| Small nodes | Use the database-creation default only when it is intentional. Preserve locale metadata in inventory and backups so a rebuild does not silently choose different ordering rules. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG15; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–15 unmodified; OLAP: PG9.0–15 unmodified; CRIT: PG9.0–15 unmodified; TINY: PG9.0–15 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Trying to remove or set lc_collate in configuration even though it was always internal/read-only.
- Assuming one cluster-wide value applies to every database.
- Changing operating-system or ICU locale data without checking collation versions and rebuilding affected indexes.
- Comparing text behavior across providers using only a locale name.
Related parameters
lc_ctype · server_encoding · client_encoding · icu_validation_level · default_text_search_config · server_version_num