couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Samuel Newson <>
Subject Re: Bulk deletes and disk size
Date Fri, 07 Mar 2014 09:47:50 GMT

Adding _deleted:true marks the document as deleted only, it does not remove the body or the
attachments. This is why your disk usage has not reduced; you haven’t reduced the size of
your documents.

When you delete a document with the DELETE http method you are really doing a PUT with just
{"_id":"foo", "_rev":"bar", "_deleted":true} so your "bulk delete" operation should do the
same if you don’t intend to keep the data.

Definitely avoid purging until you’ve discovered whether really deleting your content addresses
your disk usage.


On 7 Mar 2014, at 04:07, Gabriel de Oliveira Barbosa <> wrote:

> Hello,
> In our production system we are doing "bulk delete" by update docs with
> "_deleted:true".
> This is done in an on-demand aggregation process, so it delete a lot of
> documents per minutes and updates the daily aggregated doc in database.
> In the end of the day we should have 1 aggregated doc with 7k _revs
> (compacted periodically) and 7k documents deleted.
> But our disk usage are increasing too much fast, looks like that deleted
> documents are still there.
> After my "bulk delete" process (to replicate the deletes in other
> instances) I could run a purge operation, to really remove the deleted doc
> from the disk.
> I'm afraid of purge operation increase my query time (reindex) and as
> consequence overflow my server resources.
> What should I do in this case?
> Thanks

View raw message