Repository navigation
Conversation
olivermt
marked this pull request as draft
October 22, 2026 12:39
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Author
|
I have put the pr in draft mode until postgrex has a release btw. Created it as a full pr by accident :) |
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.
WAL-position distance can grow because of unrelated writes or segment switches, even when Replicant has little queued data. A slow sink currently trips a permanent halt instead of allowing the stream to catch up.
This uses the pause/resume API merged in elixir-ecto/postgrex#799 to pace intake by queued payload bytes and message count while retaining the connection and slot. Feedback continues while paused, and processing credits remain separate from durable acknowledgements.
Retained transactions and batches have their own budget: spill or flush where possible, otherwise halt on actual exhaustion. Incremental snapshot pacing uses retained data rather than WAL distance. The port preserves current decoder support and includes coverage for multi-message wal2json payloads.
Submitting this as a draft until Postgrex has a release containing the pause/resume API. Once that lands, I will update the dependency, force-push the branch, and mark this PR ready for review.
This code has been running in prod for a month or so now with no issues.
Originally bumped into the problem after an importer flushed a couple of thousand rows in one write and the replicator fell over.