On Wed, Oct 26, 2022 at 10:31 AM Justin Pryzby <pry...@telsasoft.com> wrote: > On Tue, Oct 25, 2022 at 04:21:02PM -0500, Justin Pryzby wrote: > > > Restore that behavior with an explicit check, to see if it fixes the > > > occasional 'directory not empty' failures seen in the pg_upgrade tests > > > on CI. Further improvements are possible with proposed upgrades to > > > modern Windows APIs that would replace this convoluted code.
> > If I'm not wrong, this didn't fix the issue you said it fixed. > > s/said/hoped/sorry Drat. More theories needed then. Perhaps it has nothing to do with my recent changes. I am starting to wonder if we should have an rmdir() wrapper that waits for zombie files to go away, and spits out the name of the file that's in the way, and also the name/pid of the process that has it open[1] if it times out, so we have a fighting chance of debugging this type of stuff. [1] https://devblogs.microsoft.com/oldnewthing/20120217-00/?p=8283