frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: pgwire-replication - pure rust client for Postgres CDC

https://github.com/vnvo/pgwire-replication
29•sacs0ni•5d ago

Comments

sacs0ni•5d ago
I built this to have a dedicated wire-protocol client for postgres logical replication. General-purpose SQL clients either don't implement the replication protocol at all, or bury it behind abstractions designed for other use cases. Replication has a bit different mechanics - it's a stateful binary stream requiring LSN tracking, standby heartbeats, and feedback to prevent WAL bloat. Bolting that onto a query-focused client has its own challenges.

This is just the transport - raw XLogData frames and LSNs. Use pg_replicate, as an example, if you need "replicate to BigQuery." Use this if you're building replication infrastructure.

What it does:

- Explicit LSN control - start/stop at specific WAL positions for deterministic recovery

- Automatic standby feedback - no more forgotten heartbeats filling your disk with WAL

- Bounded channels - backpressure propagates to Postgres naturally

- Pure Rust, no libpq

What it doesn't do: pgoutput decoding (intentionally). That belongs in a higher layer. Simplest way of using this:

while let Some(event) = client.recv().await? { match event { ReplicationEvent::XLogData { wal_end, data, .. } => { process(&data); client.update_applied_lsn(wal_end); } _ => {} } }

malodyets•2d ago
I learned about this tonight when Claude Code picked up your library for my application that uses logical replication. Looking forward to putting it through its paces.
sacs0ni•2d ago
nice! would appreciate any feedback.
nkmnz•3h ago
> Use pg_replicate, as an example, if you need "replicate to BigQuery." Use this if you're building replication infrastructure.

Would I use this if I host my own postgres and want to use replication for „real time backups“ into a hot standby?

radimm•3h ago
Not OP - but definitely no. In such a case use just physical or - if you have special use case - logical replication that’s built in.
sacs0ni•3h ago
I agree. pgwire-replication is useful when you need to build a customized and closely controlled pipeline. In fact, it will give you the first part of handling the data (reading from the source), you still need to implement the rest yourself.

Show HN: I built a text-based business simulator to replace video courses

https://www.core-mba.pro/
75•Core_Dev•15h ago•35 comments

Show HN: mdto.page – Turn Markdown into a shareable webpage instantly

https://mdto.page
16•hjinco•3h ago•11 comments

Show HN: SkillRisk – Free security analyzer for AI agent skills

https://skillrisk.org/free-check
2•elevenapril•40m ago•3 comments

Show HN: Hc: an agentless, multi-tenant shell history sink

https://github.com/alessandrocarminati/hc
27•acarminati•8h ago•2 comments

Show HN: pgwire-replication - pure rust client for Postgres CDC

https://github.com/vnvo/pgwire-replication
29•sacs0ni•5d ago•6 comments

Show HN: OpenWork – An open-source alternative to Claude Cowork

https://github.com/different-ai/openwork
207•ben_talent•2d ago•48 comments

Show HN: Claude Quest – Pixel-art visualization for Claude Code sessions

https://github.com/Michaelliv/claude-quest
4•miclivs•1h ago•1 comments

Show HN: pubz: easy, conventional NPM publishing

https://github.com/mm-zacharydavison/pubz
3•billybat•2h ago•0 comments

Show HN: BGP Scout – BGP Network Browser

https://bgpscout.io/
23•hivedc•15h ago•11 comments

Show HN: Gambit, an open-source agent harness for building reliable AI agents

https://github.com/bolt-foundry/gambit
79•randall•16h ago•15 comments

Show HN: Reversing YouTube’s “Most Replayed” Graph

https://priyavr.at/blog/reversing-most-replayed/
70•prvt•14h ago•20 comments

Show HN: TinyCity – A tiny city SIM for MicroPython (Thumby micro console)

https://github.com/chrisdiana/TinyCity
132•inflam52•1d ago•23 comments

Show HN: Timberlogs – Drop-in structured logging for TypeScript

10•enaboapps•2d ago•6 comments

Show HN: Tabstack – Browser infrastructure for AI agents (by Mozilla)

117•MrTravisB•1d ago•22 comments

Show HN: Sparrow-1 – Audio-native model for human-level turn-taking without ASR

https://www.tavus.io/post/sparrow-1-human-level-conversational-timing-in-real-time-voice
119•code_brian•1d ago•47 comments

Show HN: Webctl – Browser automation for agents based on CLI instead of MCP

https://github.com/cosinusalpha/webctl
130•cosinusalpha•2d ago•36 comments

Show HN: The Hessian of tall-skinny networks is easy to invert

https://github.com/a-rahimi/hessian
28•rahimiali•20h ago•23 comments

Show HN: Free AI Image Upscaler (100% local, private, and free)

https://freeaitoolforthat.com/ai-image-upscaler
5•tamnv•6h ago•5 comments

Show HN: Tusk Drift – Turn production traffic into API tests

https://github.com/Use-Tusk/tusk-drift-cli
22•jy-tan•21h ago•1 comments

Show HN: GitHub – Burn – Rust tensor library and deep learning framework

https://github.com/tracel-ai/burn
5•criexe•7h ago•1 comments

Show HN: A cross-platform toolkit to explore OS internals and capabilities

6•DenisDolya•4d ago•1 comments

Show HN: Munimet.ro – ML-based status page for the local subways in SF

https://munimet.ro/
9•MrEricSir•21h ago•0 comments

Show HN: Tiny FOSS Compass and Navigation App (<2MB)

https://github.com/CompassMB/MBCompass
133•nativeforks•2d ago•46 comments

Show HN: ContextFort – Visibility and controls for browser agents

https://contextfort.ai/
13•ashwinr2002•2d ago•1 comments

Show HN: HyTags – HTML as a Programming Language

https://hytags.org
68•lassejansen•3d ago•33 comments

Show HN: Investor asks "what did engineering ship?"

2•inferno22•5h ago•1 comments

Show HN: A 10KiB kernel for cloud apps

https://github.com/ReturnInfinity/BareMetal-Cloud
66•ianseyler•2d ago•11 comments

Show HN: The viral speed read at 900wpm app

https://wordblip.com
6•Gillinghammer•11h ago•2 comments

Show HN: Xoscript

https://xoscript.com/history.xo
55•gabordemooij•2d ago•44 comments

Show HN: Voice Composer – Browser-based pitch detection to MIDI/strudel/tidal

https://dioptre.github.io/tidal/
32•dioptre•4d ago•7 comments