Replies: 2 comments 1 reply
|
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. |
|
Hi @joao00001 ! If we can share the Although probable should change name at that point, because it won't be sending WALs to the Klio server anymore, it will just delegate that to a Klio handler, whatever shape that will take.
By the way, this is an opinionated receiver. E.g.: it creates a replication slot. Which I think is fine for a backup tool, but could be made more generic later. If you have time for the prototype I can help (and also the other owners). |
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