cockroachdb / cockroachdb/cockroach
storage: add a more convenient sql function for compacting a table
Open
C-enhancement
O-support
P-3
T-storage
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
We have `crdb_internal.compact_engine_span` to compact a span, but it is very low-level: you have to specify the exact node ID, store ID, and raw keys. It's hard to manually get this information.
We should implement a higher-level function that takes a table (optionally with an index) and compacts the relevant ranges (one at a time, to minimize disruption). This would be very useful for escalations.
Jira issue: CRDB-29059
Contributor guide
Assessment
This issue has not been assessed yet.