model-writtenrun 7197 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- The thread began with Michael Paquier announcing Daniel Gustafsson's change to move remaining pg_upgrade diagnostic text files into its internal output directory #1, after which Andres Freund reported intermittent Windows failures to remove that directory #2.
- Michael suspected lingering log-file handles #3, while Justin Pryzby distinguished the log-file failure from the announced text-file change and suggested that ENOENT could conceal a file still preventing directory removal #6.
- Thomas Munro traced the problem to lstat() reporting STATUS_DELETE_PENDING as ENOENT and posted a patch restoring pgunlink()'s wait-and-retry behavior #9 #10; Michael reviewed the directory and junction handling and accepted the explanation #11 #13.
- Thomas established that a second unlink call triggers the wait and that Windows Server 2019 retains pending-deletion semantics unlike typical newer desktop systems #14; the implementation from #10 subsequently appeared in the later submission #518475 in thread #46799, which is the source of e109e43921, with that series' filesystem tests omitted.
- Discussion considered newer Windows environments and POSIX deletion semantics #15 #16, but Andres explained the container-host version constraint and favored moving CI toward full virtual machines #17.
- Because the unlink fix alone did not resolve the failures, Thomas proposed making rmtree() use get_dirent_type() so pending entries would reach unlink(), while questioning whether pg_ctl's shutdown detection could precede closure of log handles #18.
- Justin repeatedly tested the traversal patch without reproducing the failure #19, while Andres requested better diagnostic file listing in the pg_upgrade test as unpatched CI failures continued #20.
- Thomas revised the traversal to close each directory before descending and use backend descriptor-management facilities #21; this version landed unchanged as 54e72b66ed, announced in #22.
- Justin promptly found failures that included the committed traversal change #23, leading Thomas to infer that the first unlink succeeded while another process retained the file handle and to propose calling rmtree() twice #24.
- Andres advocated sleeping and retrying #25, and Thomas explained that the second traversal would activate the unlink wrapper's existing wait loop #26; the retry patch landed with comment-only edits as c289117505, announced in #28.
- Thomas's subsequent survey of roughly a thousand Windows CI builds found no recurrence after the retry fix, although warnings remained and the underlying shutdown-order problem was unresolved #29.
- The discussion then turned to FreeBSD CI failures and unavailable diagnostic logs #31 #32; Andres identified a still-running server changing artifact sizes during upload and proposed stopping it on failure #33.
- Andres announced the FreeBSD artifact-upload fix in #34; 209f0f0e85 adds the shutdown command to .cirrus.yml and is attributed to the parallel discussion in thread #43214, whose record identifies the diagnosis in #527207 and push announcement in #527331.
- Months later, Hayato Kuroda reported continuing buildfarm failures and proposed retrying stat()/lstat() inside get_dirent_type(), because pending deletion could prevent even the second traversal from reaching unlink() #35.
- The thread ends with vignesh C reporting the same failure in a newly added subscription-upgrade test #36; Hayato's follow-up remains without a demonstrated landing or resolution in the supplied record #35.