You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "karthikreddy157 (via GitHub)" <gi...@apache.org> on 2026/04/06 12:52:20 UTC
[I] How to Disable Automatic Compaction in CouchDB to Preserve Old Revisions [couchdb]
karthikreddy157 opened a new issue, #5960:
URL: https://github.com/apache/couchdb/issues/5960
### Version
3.3.0
### Describe the problem you're encountering
### 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:
* Prevent CouchDB from deleting old revisions during compaction
* Access older `_rev` data when needed
### Current Behavior
* Automatic compaction is running in the background
* Old document revisions are being cleaned up after compaction
* Unable to retrieve previous revisions once compaction occurs
### Expected Behavior
* Old revisions should be retained (or at least compaction should not run automatically)
* Compaction should only run manually when explicitly triggered
### Questions
1. How can I **disable automatic compaction (Smoosh)** in CouchDB?
2. Is there a way to **retain old revisions even after compaction**?
3. What configuration controls revision retention (`revs_limit` or others)?
4. Are there recommended approaches for audit/history use cases in CouchDB?
### What I’ve Explored
* Looked into CouchDB config files (`local.ini`, `default.ini`)
* Suspecting the **Smoosh daemon** is triggering auto compaction
* Aware of `_revs_limit` but unsure how it interacts with compaction
### Environment
* CouchDB Version: (please specify)
* Deployment: (Docker / VM / Kubernetes / etc.)
### 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_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] How to Disable Automatic Compaction in CouchDB to Preserve Old Revisions [couchdb]
Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 closed issue #5960: How to Disable Automatic Compaction in CouchDB to Preserve Old Revisions
URL: https://github.com/apache/couchdb/issues/5960
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] How to Disable Automatic Compaction in CouchDB to Preserve Old Revisions [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on issue #5960:
URL: https://github.com/apache/couchdb/issues/5960#issuecomment-4199482219
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] How to Disable Automatic Compaction in CouchDB to Preserve Old Revisions [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on issue #5960:
URL: https://github.com/apache/couchdb/issues/5960#issuecomment-4199452950
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] How to Disable Automatic Compaction in CouchDB to Preserve Old Revisions [couchdb]
Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 commented on issue #5960:
URL: https://github.com/apache/couchdb/issues/5960#issuecomment-4192461571
Hey, please read [this post](https://lists.apache.org/thread/w3nno7xqg1pjmwhgs832rnyjw6r715rh) – it’s a good starting point for deciding whether this is a good idea for your use case or not.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org