Re: [HACKERS] rmtree() failure on Windows

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] rmtree() failure on Windows
Date: 2004-10-28 00:23:03
Message-ID: 41803BE7.6060407@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:

>
>
>Try putting "RequestCheckpoint(true)" in dbcommands.c just before
>remove_dbtablespaces (about line 630).
>
>It looks like the bgwriter is not quite up-to-speed for this, either;
>you should rearrange things near line 350 of bgwriter.c so that
>smgrcloseall is performed before marking the checkpoint done in shmem.
>Else RequestCheckpoint could come back before the files are all closed.
>
>

seems to do the trick. patch attached.

>
>
>>I did wonder if there should be a call that instead of forcing a flush
>>could tell bgwriter just to forget about the file(s) because we're
>>discarding them. But that was just idle speculation - I haven't looked
>>at bgwriter at all.
>>
>>
>
>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?

cheers

andrew

Attachment Content-Type Size
dropdb.patch text/x-patch 2.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-10-28 00:41:54 Re: [HACKERS] rmtree() failure on Windows
Previous Message Mark Wong 2004-10-27 21:34:22 Re: ARC Memory Usage analysis

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-10-28 00:41:54 Re: [HACKERS] rmtree() failure on Windows
Previous Message Kris Jurka 2004-10-28 00:13:25 solaris non gcc compiler debug options