feat(gpbackup): add find-table subcommand - #45
Merged
Conversation
Add find-table CLI command that scans backup history to locate which backups contain a given schema.table, checking backups concurrently (bounded by findTableScanConcurrency) since each check is I/O-bound (history DB query + TOC file read). A backup whose history entry or TOC can't be read is skipped with a warning instead of aborting the scan. Output supports --format text/json, sharing list-backups' printers, column set, and graceful "no history db / no matches" handling. Skip warnings are routed to stderr in json mode since gplog.Warn writes to stdout and would otherwise corrupt the JSON. Also factors the coordinator FilePathInfo builder out of delete-backup into a shared helper, coordinatorFPInfo, now used by both commands.
adityatoshniwal
force-pushed
the
find-table
branch
from
August 19, 2026 10:30
6d28776 to
ea25978
Compare
haolinw
reviewed
Aug 20, 2026
haolinw
reviewed
Aug 20, 2026
…ist-backups order find-table previously included backups whose delete attempt failed (local or plugin), and sorted oldest-first. Exclude those backups and sort newest-first to match list-backups.
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.
Add find-table CLI command that scans backup history to locate which backups contain a given schema.table, checking backups concurrently (bounded by findTableScanConcurrency) since each check is I/O-bound (history DB query + TOC file read). A backup whose history entry or TOC can't be read is skipped with a warning instead of aborting the scan.
Output supports --format text/json, sharing list-backups' printers, column set, and graceful "no history db / no matches" handling. Skip warnings are routed to stderr in json mode since gplog.Warn writes to stdout and would otherwise corrupt the JSON.
Also factors the coordinator FilePathInfo builder out of delete-backup into a shared helper, coordinatorFPInfo, now used by both commands.