feat(testbedctl): add compact command - #2
Merged
Merged
Conversation
Add `testbedctl compact <table> [type] [options]`, mirroring the existing `flush` command. It runs `admin compact_table(...)` against the client PostgreSQL port (11043). Any extra args are forwarded as the compaction type (twcs/swcs) and type-specific options (e.g. parallelism=4). testbedctl compact my_table testbedctl compact my_table twcs testbedctl compact my_table twcs 'parallelism=4'
sunng87
added a commit
that referenced
this pull request
Jul 23, 2026
Add the flush and compact commands to the testbedctl command lists in AGENTS.md and README.md (compact was added in #2 but the docs were missed; flush was previously undocumented too).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a
compactcommand totestbedctl, mirroring the existingflushcommand. It triggers GreptimeDB'sadmin compact_table(...)against the client PostgreSQL port (11043), so it works identically in distributed (haproxy),standalone,standalone-fs, and active/standby modes.Usage
The table name is always the first argument; any extra args are forwarded as the compaction type (
twcs/swcs) and type-specific options (e.g.parallelism=N), matching GreptimeDB'scompact_tablesignature. Listed intestbedctl help, and follows the same usage/exit-1 pattern asflush.Verification
bash -n testbedctlpasses.psql).testbedctl helpshows the new command.