Re: rmtree() failure on Windows - Mailing list pgsql-hackers

From Tom Lane
Subject Re: rmtree() failure on Windows
Date
Msg-id 28121.1098738923@sss.pgh.pa.us
Whole thread Raw
In response to Re: rmtree() failure on Windows  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: rmtree() failure on Windows
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> If I increase the sleep time before dropdb enormously (35 secs) the 
> unlink errors seem to go away, and instead they become rmdir errors like 
> the rest.

Do you have anything equivalent to ps that you could use to check
whether there is still an old backend alive during this interval?

Does Windows forbid deleting a directory that is the current working
directory of some process (assuming they even have the same concept
of cwd as Unixen)?  If so, is this the same error symptom you would get?
I am wondering if the rmdir failure occurs because an old backend is
still chdir'd into the database directory.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: rmtree() failure on Windows
Next
From: Greg Stark
Date:
Subject: Re: [PATCHES] ARC Memory Usage analysis