开发者

couchdb - deleting revision

开发者 https://www.devze.com 2023-01-12 00:39 出处:网络
How is it possible to relete old revisions of couchdb doc开发者_StackOverflowument?You cannot delete an old revision of a single document. This is because the old revisions are only used by CouchDB in

How is it possible to relete old revisions of couchdb doc开发者_StackOverflowument?


You cannot delete an old revision of a single document. This is because the old revisions are only used by CouchDB internally for concurrency control and you shouldn't have to worry about these revisions.

If you want to remove all old revisions in order to shrink the size of your database, you can run compaction.


take care that it is not enough to delete the documents and their revisions with compaction, still some data is being saved in the db such as the last revision of the document.

In order to be 100% sure to delete all data you have to purge your db using this api:

POST /{db}/_purge

More on: http://docs.couchdb.org/en/1.6.1/api/database/misc.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号