couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Zhengji <>
Subject Re: Windows support
Date Tue, 15 Dec 2009 06:40:50 GMT
Hi all,

I am using 0.10.1 on Erlang/OTP R13B03 on Windows. And I find that
things are not that easy.

After applying a quick patch to R13B03, DB compaction still fails:

Step 1. delete db.couch --> succeed. (note: file db.couch is still opened.)
Step 2. rename db.couch.compact to db.couch --> failed (note: but it's
ok to rename it to something else)

This blog (
tells us the implementation of SHARE_DELETE in OS. I suspect that
after step 1, db.couch is just hidden and the deletion would happen
only after the corresponding Fid is closed, so it's not allowed to
rename some other files to db.couch.

So I split step 1 into 2 sub-steps:

Step 1.1: rename db.couch to db.couch.2.
Step 1.2: delete db.couch.2

Now, compaction can work gracefully on my Windows XP box.

Hope this information would help.

On Thu, Jun 4, 2009 at 9:55 AM, Li Zhengji <> wrote:
> For DB compaction, I think that besides to ask Erlang/OTP team to
> modify BEAM VM, a patch to the VM is also easy and possible.
> For example, I have sent a patch to user list:
>> Here is a quick fix for R13B(5.7.1) beam.smp.dll
>> (MD5:4c733eaef7f8619cbac0c9a4b84e20d2):
>> Change the byte at 0xB5720 from 0x03 to 0x07. Enjoy DB compaction.
> --
> Li Zhengji

View raw message