Skip to content

feat(api): add endpoint for pg-pg source and destination row count check#4556

Merged
Amogh-Bharadwaj merged 3 commits into
mainfrom
pg-row-check
Jul 9, 2026
Merged

feat(api): add endpoint for pg-pg source and destination row count check#4556
Amogh-Bharadwaj merged 3 commits into
mainfrom
pg-row-check

Conversation

@Amogh-Bharadwaj

@Amogh-Bharadwaj Amogh-Bharadwaj commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Why

This is useful for validating mirror correctness after initial load and zero-lag CDC for PG - PG mirrors.

What

  • Adds new proto definitions for a route
  • New handler in flow-api for mirror row count check, scoped to PG to PG mirrors.
  • Adds api test for this new route

What the endpoint does

User can pick a selection of tables to validate counts for.
Counts for source and destination obtained via two goroutines.

  • For tables greater than 10GB -- gets an approximate row count as counts can take a long time

  • For tables lesser than 10GB -- gets exact count
    Count times capped to 30 seconds for each table. Response structure denotes what the counts are and whether they're approximate

  • Functionally tested

@Amogh-Bharadwaj Amogh-Bharadwaj requested a review from a team as a code owner July 9, 2026 06:19
@Amogh-Bharadwaj Amogh-Bharadwaj requested a review from serprex July 9, 2026 06:20
ilidemi
ilidemi approved these changes Jul 9, 2026
Comment thread flow/cmd/row_counts.go
@claude

claude Bot commented Jul 9, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@Amogh-Bharadwaj Amogh-Bharadwaj merged commit 8e0365b into main Jul 9, 2026
23 checks passed
@Amogh-Bharadwaj Amogh-Bharadwaj deleted the pg-row-check branch July 9, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants