Skip to content

Batch Postgres boundary queries to prevent excessive query size#49

Merged
tjschutte merged 5 commits intomainfrom
batch-boundary-queries
Feb 23, 2026
Merged

Batch Postgres boundary queries to prevent excessive query size#49
tjschutte merged 5 commits intomainfrom
batch-boundary-queries

Conversation

@EthanRBrown
Copy link
Copy Markdown
Contributor

The Postgres boundary query was already operating in a transaciton, so all that was necessary was chunking the constraints to prevent the query size from growing unmangeable.

In true TDD style, I added a test that failed before this fix; batching the query causes the test to pass.

The Postgres boundary query was already operating in a transaciton, so
all that was necessary was chunking the constraints to prevent the query
size from growing unmangeable.

In true TDD style, I added a test that failed before this fix; batching
the query causes the test to pass.
@EthanRBrown EthanRBrown requested a review from lazamar February 19, 2026 06:47
- Use existing `chunksOf`
- Avoid unnecessary query for last batch (with no upper bound)
- Wrap batches in transaction
- Does not modify/expose PostgreSQL connector internals fo rtesting
@EthanRBrown EthanRBrown force-pushed the batch-boundary-queries branch from f3f499b to bbe32f1 Compare February 20, 2026 17:19
@EthanRBrown EthanRBrown requested a review from lazamar February 20, 2026 19:41
@EthanRBrown EthanRBrown requested a review from lazamar February 20, 2026 22:29
longer pulling fully query results into memory.
@tjschutte
Copy link
Copy Markdown
Contributor

Approving to unblock a customer migration

@tjschutte tjschutte merged commit bf0d60c into main Feb 23, 2026
1 check passed
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.

3 participants