Replies: 1 comment
|
Thanks @joao00001. Sounds like a great idea to me, but I leave it up to @fcanovai, who's currently leading the Klio project, to respond. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi all 😄. I've been reading through Klio's core/internal/client/sendwal package (the WAL streaming receiver: IDENTIFY_SYSTEM, replication slots, START_REPLICATION, timeline handling, built on pgx + pglogrepl). It's already written with a clean sink interface (buffer.Handler) that isn't Klio-specific, and it's one of very few working, tested implementations of Postgres WAL streaming in Go.
I think it's worth considering as a standalone module rather than something buried in Klio's internal/ tree, for a few reasons:
Two things would need to happen for it to actually be extractable cleanly: right now receiver.go pulls in the full cloudnative-pg/cloudnative-pg operator module just for one function (SegmentFromName), and it talks to Klio's gRPC client directly instead of through the Handler interface it already has for the write side. Neither is a big lift, but they're real before/after conditions for this to be a genuinely lightweight library.
Not proposing pulling WAL filename/LSN parsing into this, since that already lives in machinery and should probably stay there. Curious whether this seems worth an issue + small prototype PR, and who from Klio's maintainers would want to be involved early given it touches module boundaries.
All reactions