workload: add --list-dbs flag to workload_generator#163930
Merged
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom Feb 24, 2026
Merged
workload: add --list-dbs flag to workload_generator#163930trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Contributor
|
😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details. |
Member
0844e7d to
1befa20
Compare
herkolategan
approved these changes
Feb 24, 2026
1befa20 to
1ab8b08
Compare
Before this change, users needed to manually inspect debug logs to
determine which databases were available before running `workload init
workload_generator`. This required opening the debug zip and examining
the `crdb_internal.create_statements.txt` file.
This commit adds a `--list-dbs` flag that scans the debug logs and
prints all user databases (excluding system databases: system, postgres,
defaultdb, and NULL entries). The flag exits immediately after printing
to prevent duplicate output from multiple PreCreate hook invocations.
This commit also adds a comprehensive README.md for the workload_generator
package that documents all features, flags, and usage patterns.
Example usage:
./cockroach workload init workload_generator \
'postgresql://...' \
--debug-logs=/path/to/debug/logs \
--list-dbs
Release note (cli change): Added a `--list-dbs` flag to `workload init
workload_generator` that lists all user databases found in debug logs
without initializing tables. This helps users discover which databases
are available in the debug zip before running the full init command.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1ab8b08 to
41564aa
Compare
Contributor
Author
|
Thanks @herkolategan for your review and approval! |
Contributor
Author
|
/trunk merge |
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.
Before this change, users needed to manually inspect debug logs to determine which databases were available before running
workload init workload_generator. This required opening the debug zip and examining thecrdb_internal.create_statements.txtfile.This commit adds a
--list-dbsflag that scans the debug logs and prints all user databases (excluding system databases: system, postgres, defaultdb, and NULL entries). The flag exits immediately after printing to prevent duplicate output from multiple PreCreate hook invocations.This commit also adds a comprehensive README.md for the workload_generator package that documents all features, flags, and usage patterns.
Example usage:
./cockroach workload init workload_generator
'postgresql://...'
--debug-logs=/path/to/debug/logs
--list-dbs
Release note (cli change): Added a
--list-dbsflag toworkload init workload_generatorthat lists all user databases found in debug logs without initializing tables. This helps users discover which databases are available in the debug zip before running the full init command.Epic: None
Release Notes: None