Re: pgsql: Fix unlink() for STATUS_DELETE_PENDING on Windows. - Mailing list pgsql-committers

From Thomas Munro
Subject Re: pgsql: Fix unlink() for STATUS_DELETE_PENDING on Windows.
Date
Msg-id CA+hUKGLx+hd9AUy5Cb7TO9osgV84_NT0-ggHy7B6MBpcVpmmLQ@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Fix unlink() for STATUS_DELETE_PENDING on Windows.  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: pgsql: Fix unlink() for STATUS_DELETE_PENDING on Windows.
List pgsql-committers
On Wed, Oct 26, 2022 at 10:31 AM Justin Pryzby <pryzby@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



pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Doc/improve confusing, inefficient tests to locate CTID variable
Next
From: Justin Pryzby
Date:
Subject: Re: pgsql: Fix unlink() for STATUS_DELETE_PENDING on Windows.