Skip to content

feat: faster replication#1166

Open
yogesh1801 wants to merge 5 commits into
pgdogdev:mainfrom
yogesh1801:faster-replication
Open

feat: faster replication#1166
yogesh1801 wants to merge 5 commits into
pgdogdev:mainfrom
yogesh1801:faster-replication

Conversation

@yogesh1801

@yogesh1801 yogesh1801 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

fixes #1036

@yogesh1801

Copy link
Copy Markdown
Contributor Author

I am still working on the design for it, just a peak if the direction seems well @levkk

@yogesh1801 yogesh1801 changed the title faster replication v1 faster replication Jul 8, 2026
@levkk

levkk commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Cool! Would be good to see some benchmark numbers, just to get a sense of how much faster this is.

@yogesh1801

Copy link
Copy Markdown
Contributor Author

Do you have any such setup so that i can benchmark it?

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.35821% with 58 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...backend/replication/logical/subscriber/pipeline.rs 78.37% 48 Missing ⚠️
...c/backend/replication/logical/subscriber/stream.rs 80.00% 9 Missing ⚠️
pgdog/src/backend/replication/logical/error.rs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@levkk

levkk commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Do you have any such setup so that i can benchmark it?

This might work:

benches/bench.sh

Specifically, see resharding folder.

@yogesh1801

yogesh1801 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author
image

PGDOG_BIN=/tmp/pgdog-new bash benches/resharding/replication/run.sh --baseline main

@yogesh1801

Copy link
Copy Markdown
Contributor Author

For BENCH_SCALE = 3000, DEST_LATENCY_MS=10 we have more performance boosts

image

@yogesh1801

Copy link
Copy Markdown
Contributor Author

RUNS = 2
WARMUP = 1
BENCH_SCALE = 5000
DEST_LATENCY_MS = 10
USE_TOXI = 1

image

@levkk results seems good but also too good at a point

@levkk

levkk commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Async should be a big improvement, so not that surprising. This is very cool. Let me know when you're ready for a review, I'll tag Kiryl.

@yogesh1801

Copy link
Copy Markdown
Contributor Author

@levkk ready for review

@yogesh1801 yogesh1801 changed the title faster replication feat: faster replication Jul 13, 2026
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.

Add async streaming for replication to improve replication speed

2 participants