Re: [HACKERS] rmtree() failure on Windows - Mailing list pgsql-patches

From Tom Lane
Subject Re: [HACKERS] rmtree() failure on Windows
Date
Msg-id 26443.1098924114@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] rmtree() failure on Windows  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-patches
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> Try putting "RequestCheckpoint(true)" in dbcommands.c just before
>> remove_dbtablespaces (about line 630).

> seems to do the trick. patch attached.

Patch applied.

>> Not necessary, as long as you put the checkpoint after the DropBuffers
>> call in dbcommands.c.  The bgwriter won't find anything to write.

> What about other databases? Or won't the forced checkpoint affect them?

For them, it's just an ordinary checkpoint.  It's kind of a brute-force
solution, but I'm disinclined to worry about optimizing DROP DATABASE ...

            regards, tom lane

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] rmtree() failure on Windows
Next
From: Neil Conway
Date:
Subject: Re: pgstat cleanup: use palloc and AllocateFile