model-writtenrun 2766 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Nov - Dec 2024 ยท 14 entries
- Adam Rauch reported that PostgreSQL 17 rejected connections using overlength database names that earlier releases had truncated successfully, while CREATE and ALTER still accepted them #1.
- Tom Lane traced the regression to the deliberate removal of startup-packet truncation and explained that an unknown name encoding prevented straightforward multibyte-safe clipping #2; he rejected Nathan Bossart's suggestion to eliminate identifier truncation generally because of longstanding compatibility expectations #3 #4.
- Tom proposed successively shortening overlength names and probing the catalog, while Nathan suggested rejecting multiple matches #4 #5; database-encoding lookup and catalog scans were rejected because names need not use the target database's encoding, roles are global, and repeated indexed probes would be cheaper #14 #16.
- Nathan posted the first database-only prototype #20, Bertrand Drouvot added review comments #21, and Bruce Momjian's objections to the comments and separated high-bit checks prompted a revised loop #26 #28 #33.
- John Naylor questioned the high-bit assumption using Shift JIS, and Tom clarified that the heuristic depended on catalog names being valid in a supported server encoding, which excludes Shift JIS #31 #32.
- Tom moved truncation into the database lookup helper and changed the policy to accept the first match, avoiding new failures for names that previously connected successfully #34; Nathan simplified the loop, and Bertrand explored and corrected a short-name fast path #35 #39 #40.
- Nathan extended the patch to update the stored database name and process title, but warned that the workaround was growing too complicated while role-name handling remained unfinished #42; Tom agreed that reverting deserved consideration, and Bertrand demonstrated ambiguity even with names using the same encoding #43 #44.
- Bertrand initially preferred retaining PostgreSQL 17's consistent rejection behavior, but accepted reverting after Nathan pointed out that the change had not solved the original multibyte problem and now broke another user's application #46 #47 #48.
- Tom proposed preserving untruncated names for connection errors while restoring old lookup behavior #50; Nathan supplied an alternative that saved raw names in struct Port before startup truncation, avoiding authentication-hook inconsistencies, and Bertrand highlighted the risks of backpatching the structure additions #51 #52.
- Thomas Munro proposed three explicit shared-catalog encoding modes: a single encoding throughout the cluster, ASCII-only shared catalogs with mixed database encodings, and a legacy unrestricted mode #53; Tom supported the approach because it could also make startup-name validation and truncation well-defined #54.
- Thomas posted a separate proof of concept with catalog validation, control-file and WAL support, ALTER SYSTEM syntax, documentation and tests, choosing single-encoding mode by default while leaving startup integration and other details unfinished #57.
- Bruce questioned the new restrictions, Tom explained their benefits beyond overlength identifiers, and Bertrand proposed a data-driven validation structure while supporting the default and actionable errors #58 #59 #62; Thomas agreed to continue the broader work in a dedicated hackers thread #63.
- Nathan returned to the immediate regression and proposed a straight revert on both master and PostgreSQL 17, which Tom and Thomas endorsed while reserving comprehensive encoding changes for a future release #64 #65 #66.
- Nathan committed d09fbf645e, restoring fixed-byte startup truncation without the attached heuristic or raw-name preservation changes, and announced completion #67; the immediate regression was addressed, while proper multibyte truncation and shared-catalog encoding remained follow-up work.