How to Disable Automatic Compaction in CouchDB to Preserve Old Revisions #5963
Replies: 3 comments
-
|
Hey, please read this post – it’s a good starting point for deciding whether this is a good idea for your use case or not. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, This is a misconception and you need to change tactic. Compaction is not optional, it is essential for performance and the only way to recover disk space. If you need "old" versions of your data you need to preserve them in the latest revision of some document. |
Beta Was this translation helpful? Give feedback.
-
|
To expand a little, you absolutely can build an application that retains a history of your documents but you need to build it yourself, couchdb is not providing one automatically for you with our MVCC feature. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version
3.3.0
Title
How to Disable Automatic Compaction in CouchDB to Preserve Old Revisions
Description
Hi Team,
I’m working with CouchDB and need to retain older document revisions (
_rev) for auditing and historical tracking purposes. However, I’ve observed that automatic compaction is removing old revisions, which is impacting my use case.Requirement
I want to:
_revdata when neededCurrent Behavior
Expected Behavior
Questions
revs_limitor others)?What I’ve Explored
local.ini,default.ini)_revs_limitbut unsure how it interacts with compactionEnvironment
Additional Context
This is part of a requirement where I need to track historical changes of documents, so losing old revisions is not acceptable.
Any guidance on best practices or configuration changes would be greatly appreciated.
Expected Behaviour
Old revisions should be retained (or at least compaction should not run automatically)
Compaction should only run manually when explicitly triggered
Steps to Reproduce
No response
Your Environment
No response
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions