Re: DROP DATABASE vs patch to not remove files right away - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: DROP DATABASE vs patch to not remove files right away
Date
Msg-id 48067412.7030208@dunslane.net
Whole thread Raw
In response to Re: DROP DATABASE vs patch to not remove files right away  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:
> Heikki Linnakangas <heikki@enterprisedb.com> writes:
>   
>> Tom Lane wrote:
>>     
>>> ISTM that we must fix the bgwriter so that ForgetDatabaseFsyncRequests
>>> causes PendingUnlinkEntrys for the doomed DB to be thrown away too.
>>>       
>
>   
>> Because of the asynchronous nature of ForgetDatabaseFsyncRequests, this 
>> still isn't enough, I'm afraid.
>>     
>
> Hm.  I notice that there is no bug on Windows because dropdb forces a
> checkpoint before it starts to remove files.  Maybe the sanest solution
> is to just do that on all platforms.
>
>             
>   

IIRC we did that to avoid an unlink problem :-)

I certainly don't see any particular reason not to do it everywhere.

cheers

andrew


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Lessons from commit fest
Next
From: Alvaro Herrera
Date:
Subject: Re: Lessons from commit fest