model-writtenrun 3038 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
May - Nov 2024 · 13 entries
- Haifang Wang reported PostgreSQL installation crashes on Turkish Windows systems, and Thomas Munro initially connected them to Windows renaming Turkey to Türkiye, which could invalidate locale names stored in existing clusters #1 #2.
- Haifang relayed Microsoft's suggestions to use _wsetlocale() or extend PostgreSQL's locale mappings; Thomas instead emphasized stable BCP 47 identifiers for future clusters and a mapping file to recover existing ones #5 #6 #8.
- Tom Lane supported a plain-text recovery file because an administrator cannot update a system table when the database cannot start, and Thomas supplied the first dynamic mapping implementation while raising compatibility and encoding questions #9 #11 #12.
- Tom favored user-supplied mappings over maintaining new built-in translations, while Thomas reported Magnus Hagander's alternative suggestion of an installed translation file; Rahul Pandey subsequently confirmed that the traditional Turkish names and the proposed BCP 47 name represented the same locale behavior #16 #25 #26 #30.
- With Windows testing still unavailable, Thomas revised the mapping proposal to support an environment-selected or installation-directory file, documented its use, and added a build option allowing Unix developers to exercise the Windows mapping code #35.
- An unrelated report about Find and Replace in a graphical query tool was redirected to the pgAdmin project, and Haifang agreed to report it there #37 #38 #39.
- Thomas added TAP tests and FreeBSD CI coverage, discovering that remapping restored connections but required catalog updates before template-based database creation would work, and that numeric code-page suffixes on BCP 47 names failed in CI; Andrew Dunstan reviewed the tests, and Thomas incorporated his style and assertion corrections #40 #41 #42.
- Discussion identified the EDB installer's explicit use of traditional locale names, and Sandeep Thakkar offered a test installer, but Thomas subsequently withdrew the mapping feature because Windows Locale Builder could repair existing clusters and the installation report concerned a distinct runtime crash during locale restoration #42 #44 #47.
- Thomas proposed rejecting non-ASCII locale names in initdb so installation would fail with an explanatory error instead of crashing; Andrew endorsed that approach, and Thomas acknowledged that the initial demonstration still needed default-locale handling and matching backend checks #50 #52 #55.
- The revised fix checked explicit, inherited, and canonicalized names, added backend validation, and used _wsetlocale() to preserve inherited Windows locale names safely across encoding changes; CREATE COLLATION was deliberately excluded because it used different locale APIs and adding check_locale() caused test failures #56.
- Thomas reported successful local simulations and CI runs but continued seeking Windows testing and review of upgrade implications; he also explained that the EDB installer would still fail for non-ASCII names unless it offered usable alternatives such as BCP 47 names #66 #69.
- Thomas committed the revised rejection patch as adbb27ac89, with moderate edits that extracted locale save/restore helpers and extended their use to locale_date_order(), and announced the completed fix and backpatches #70.
- At the thread's end, Haifang still reproduced the issue with the older installer, and Thomas clarified that the fix was in PostgreSQL 17.1 and 16.5 with packaging underway; the mapping feature remained withdrawn, while installer locale selection and possible future CREATE COLLATION harmonization remained separate follow-up work #71 #72 #73 #47 #69 #70.