model-writtenrun 4448 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jeff Davis opened the thread in #1 because ICU accepted bogus locale strings through fallback behavior, proposing validation and a consistent BCP 47 representation in PostgreSQL catalogs.
- Peter Eisentraut questioned whether canonicalization would discard the user's regional intent in #2 and #9; Jeff demonstrated in #4 and #11 that conversion preserves those distinctions rather than substituting the resolved collator's locale.
- Robert Haas supported better validation but highlighted poor discoverability in #3, while Andreas Karlsson accepted BCP 47 storage in #8 after Jeff clarified in #7 that readable ICU locale IDs would remain valid input.
- Jeff's initial patch #15 canonicalized newly supplied locales and compared collators before changing strings during upgrades; #17 added configurable validation, warnings, and tests.
- In #18, Jeff abandoned the complicated upgrade-equivalence checks in favor of preserving existing locale strings verbatim and added a SQL-callable conversion helper.
- Peter separated canonicalization, representation conversion, and validation conceptually in #19, then warned in #21 and #23 that automatic conversion could break attribute handling and deployment onto older ICU versions.
- Jeff addressed that prerequisite with #24, converting language tags back to ICU locale IDs before parsing attributes, and expanded it in #25 with a common opening wrapper and und-to-root translation for older ICU releases.
- The combined series #26 restored canonicalization and its SQL helper while temporarily withholding validation; #27 restored validation using ICU's list of available languages instead of interpreting fallback to the root collator.
- Peter's review #28 led to clearer comments and removal of a redundant ASCII check, after which the first component of #27 landed as 869650fa86, as reported in #29.
- The revised wrapper and und handling in #29 received Peter's approval in #30 and landed as a326aac8f1 and 3b50275b12, preventing older ICU versions from treating und as an unknown locale and falling back to the environment.
- After Peter questioned the SQL helper's relationship to C/POSIX handling in #30, Jeff removed the SQL interface in #32, retaining internal conversion support and deferring public functions until concrete user needs emerged.
- Peter's request in #33 to use elog() for an internal-only failure produced 9a24289915 directly from discussion, without an attached patch.
- The leak/error refactor submitted in #32 was split after Peter proposed a simpler immediate fix in #34: a03b3b6b4a merely closed the collator before reporting an error, leaving error consistency for further work.
- Peter's broader review in #34 prompted #35 to move default-locale selection into setlocales(), separate the initdb message, replace the validation boolean with icu_validation_level defaulting to ERROR, and put validation ahead of canonicalization.
- The error-consistency component of #35 landed as 8b3eb0c584, with an additional change routing canonicalization failures back to the wrapper so it could close the collator and report the original locale string.
- Following Peter's review in #36, the initdb components of #35 landed as f8ca22295e and c1f1c1f87f, extracting default-locale discovery and identifying when the locale came from the environment.
- Validation from #35 landed as 1671f990dd with centralized build-condition handling and revised upgrade behavior; Jeff explained in #37 that upgrade validation would run but report at most WARNING to avoid failures buried deep in upgrade logs.
- Jeff submitted canonicalization alone in #37, and Peter supported proceeding in #38 while requesting fewer notices, clearer wording, documentation updates, and reconsideration of the upgrade exception.
- Jeff defended preserving upgraded locale strings in #39 because correcting historical interpretations such as fr_CA.UTF-8 could change the collator underlying existing indexes; detecting and repairing such cases before upgrade remained future work.
- The final revision #40 incorporated the notice and documentation requests, received Peter's approval in #41, and landed unchanged apart from whitespace and commit-message expansion as ea1db8ae70, retaining the upgrade exception and avoiding backporting the behavior change.
- Thomas Munro reported an MSVC missing-return warning in #42, leading to 36320cbc16, which added compiler-satisfying returns to both canonicalization helpers.
- Noah Misch reported slower buildfarm runs under debug_parallel_query in #43, and Jeff's benchmarks in #44 investigated the cost of repeatedly opening different ICU collators.
- After Noah identified en-US-u-va-posix as the affected locale in #45, Jeff confirmed its higher opening cost in #46 and concluded that subsequent removal of environment-derived ICU locale selection made the issue unlikely in practice; the accepted features had landed, the SQL helper remained deferred, and no further patch was proposed in this thread.