model-writtenrun 2971 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that valid but oversized SCRAM secrets could be stored successfully yet fail authentication because detoasting required access to pg_class before a database was selected #1.
- Tom Lane proposed removing pg_authid's TOAST table rather than making detoasting work during authentication #2, and Alexander's investigation found that the suspected equivalent problem with pg_database did not occur #3.
- After Alexander revived the issue almost a year later #4, Nathan Bossart sought a clearer error than a failed login or oversized-row error #5, and Tom suggested an explicit length limit #6.
- Nathan submitted a 256-byte check for supplied SCRAM hashes #8; Tom requested enforcement across all encrypt_password paths, an error code and an explicit limit in the diagnostic #9, while Jonathan S. Katz argued for room for larger salts and future hashes #10.
- Nathan expanded the work into password-length enforcement with regression tests and a separate TOAST-removal patch #11; Michael Paquier approved the removal, questioned the need for the extra limit and identified a stale test comment #12, while Jonathan defended the clearer error #13.
- Nathan corrected the test comment and compiler warnings in the revised series #14, and Tom's review requested that the diagnostic describe bytes rather than characters #15.
- Nathan committed the TOAST-removal component of #14 with a catalog-version bump as 6aa44060a3, then posted the remaining length-check patch with the diagnostic correction #16.
- Nathan subsequently decided to leave the arbitrary length limit uncommitted #17, but Tom argued that a uniform limit would avoid platform-dependent oversized-row failures #18, prompting Nathan to reconsider despite uncertainty about future hash formats and unusual salts #19.
- Jacob Champion supported the check and estimated that SCRAM-SHA-512 would still fit within 256 bytes #21, while Jonathan cautioned that existing salts could be longer and preferred a more generous limit #22.
- Tom favored a fixed larger limit over one derived from BLCKSZ and discussed separate storage options for possible future password-history features #23; Nathan selected 512 bytes to accommodate the minimum supported block size and treated future catalog redesign as separate work #24.
- After Hannu Krosing questioned the minimum block size #25 and Nathan supplied the documentation reference #26, Nathan committed #16 with a 512-byte limit and corresponding test updates as 8275325a06.
- The thread ended with both changes landed and Nathan noting that the 512-byte limit could still be adjusted before PostgreSQL 18 #27.