Repository navigation
Conversation
serprex
force-pushed
the
split/durable-replies
branch
from
October 23, 2026 14:20
a9b8599 to
1fabf4e
Compare
Standby replies went out only every status interval (10 s by default) or when a keepalive asked. Apply and flush, bounded as before by shadow replay, the ClickHouse-acknowledged resume-safe position and the persisted floor, could therefore sit a whole interval behind what the daemon had made durable: the source kept that WAL longer, and on the write-heavy repro (interval 1 s) it was most of a second of the drain's acknowledgement tail. Reply as soon as apply or flush advances past what the source was last told, as PostgreSQL's walreceiver does after each flush, but at most ten times per interval. The values sent are unchanged, so nothing is acknowledged earlier than it is durable; only the delay shrinks. A zero --status-interval is now refused: PostgreSQL reads a zero wal_receiver_status_interval as no replies, and the source keeps WAL until a reply releases it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
serprex
force-pushed
the
split/durable-replies
branch
from
October 23, 2026 14:26
1fabf4e to
661a913
Compare
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.
Durable apply and flush advances wait for periodic standby status replies. Report advances sooner, matching logic in postgres.
Extracted from original #228 and based directly on
main. Contains no changes from #226 or other extracted PRs.Validation:
cargo fmt --all -- --check,cargo clippy --workspace --all-targets --locked -- -D warnings, andcargo test --locked --lib source::source_feed(8 passed). Rebuild crate for each isolated diff.Measured impact (2026-10-22)
Compared
a9b85994dc01d67d08c0a061180b097ca5c5723aagainst shared parent151fd47cbd75ec7b9bc63ffe7040f049e702ecd0, with each PR built separately.Workload: real
SourceFeedagainst loopback PostgreSQL protocol fixture, 500 ms status interval, advancing write/flush/apply positions across 60 polls, each cancelled after 20 ms. Read complete status frames on server side. Uses real elapsed time; 50 ms receive wake floor and poll cadence affect measured latency. Measures feedback scheduling, without WAL throughput or source WAL recycling measurements.AMD Ryzen 7 7840U; rustc 1.99.1; locked dependencies; optimized release builds; mimalloc 0.1.52. Seven trials per revision, alternating base/PR order, pinned to CPUs 2,4,6 (three physical cores). Values show median [min, max]; negative time changes mean less work or waiting. Local component measurements, without PostgreSQL or ClickHouse services.