model-writtenrun 7899 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Justin Pryzby wanted pg_ls_tmpdir to expose temporary files hidden inside parallel workers' shared-fileset directories, while Fabien COELHO favored listing their relative paths without changing the output columns #1 #2 #4.
- The first attached series added one-level traversal and corrected a misleading stat error message; Justin then reorganized traversal state into directory_fctx structures after Fabien's implementation feedback #5 #6 #7.
- Fabien argued for a stack and unrestricted traversal depth because extensions could create deeper directories, and Alvaro Herrera supported listing directories with an isdir column and root-relative paths without a separate parent column #8 #10 #13 #14.
- Justin supplied both precomputed and incremental traversal implementations, then consolidated the incremental version, fixed filtering and missing-directory bugs, and split out documentation and proposed behavior changes for other directory functions #16 #17.
- Fabien found missing tests, incorrect enum arguments, and a faulty directory-allocation check; the next revision added regression coverage and corrected documentation and arguments #18 #21 #22.
- Justin changed direction toward a generic pg_ls_dir_metadata function, a shared flag-driven implementation, and SQL-based recursion for arbitrary directories, leaving expanded metadata as a separate proposal #23.
- The series was rebased onto materialized directory listing, dropping the error-message fix already handled separately, and Fabien's next review led to clearer flags, corrected recursive calls, and additional tests and documentation #24 #25 #26.
- Fabien demonstrated that following directory symlinks could create recursive cycles, prompting Justin to mark links as isdir=false and add documentation describing the previous behavior #27 #29 #30.
- Alvaro committed the two directory-hiding documentation patches from #30 together as 8b6d94cf6c, preserving their wording and correcting the backpatch scope #31.
- Justin resent the remaining series with lstat-based metadata and restricted execution privileges, then added one-argument metadata support and the standalone pg_ls_dir option tests after Fabien found an interface mismatch #32 #33 #34.
- The proposal expanded to character-coded file types, and further review produced a shared stat-to-tuple helper and support for devices, FIFOs, and sockets, while Justin declined to combine file inspection and directory enumeration into one function #36 #37 #38.
- Through May and June, Justin maintained the series across documentation changes and corrected descriptions of the new output, but still sought committer agreement on the generic API and SQL functions; Fabien's suggestion to replace more C wrappers with SQL remained unadopted #39 #40 #41 #42.
- Investigating pg_rewind failures led Justin to add a separate parent-path column, integrate the recursive function into pg_rewind, and normalize paths rooted at '.', revisiting the earlier preference against a separate path column #43 #44.
- After months awaiting senior review, Justin refreshed the series again in October and November without changing its central design #45 #46 #47.
- Tom Lane objected to incompatible output changes, SQL recursion's performance and security implications, weak regression coverage, and Windows lstat behavior; Stephen Frost defended API improvements, and they found common ground on retaining pg_stat_file's isdir column #48 #49 #50 #51.
- Justin replaced the recursive SQL function with an optional C recursion mode and retained isdir alongside the new type output, keeping recursion last so earlier changes could proceed independently #52.
- Tom identified collation dependence and unstable filesystem contents in the recursive-listing test, and Justin revised it to select known paths and normalize case; at the last recorded message, the broader feature series remained uncommitted, with compatibility, platform behavior, and testing concerns still under review #53 #54.
- In March 2022, Michael Paquier extracted the pg_ls_dir option tests carried in #54 into ff8b37ba80, rewriting the assertions and comments while leaving out the pg_stat_file check and broader directory-listing features.