frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Mason – a lightweight Postgres read-replica, built on columnar storage

https://masondata.ai/
19•tagspace•2h ago
Hi HN! TLDR: we’ve built an open-source drop-in replacement for a postgres read-replica, powered by duckdb’s columnar compute engine. It’s very fast. And it looks like postgres.

So, this started out as: let’s just connect Clickhouse to our postgres dbs and throw our analytics queries at it instead. That will speed everything up. But we quickly found that 1) Clickhouse comes with quite the learning curve (engine optimisation) to make it fast (we needed something we could easily drop in to any customer’s postgres scenario), and 2) we had underestimated how different clickhouse’s SQL syntax was to postgres. Don’t get me wrong: we love Clickhouse (it’s ridiculously fast if you know what queries to expect), it just didn’t work for our ad-hoc postgres workloads.

So we went searching for alternatives that were 1) more plug-and-play and 2) looked a lot more like postgres.

We dismissed a bunch based on desk research alone:

- pg_mooncake (seems to have stalled since data bricks bought them)

- pg_duckdb (seems to offer fast queries, or fresh data, but not both - we needed both)

- materialize/risingwave/readyset (like Clickhouse, they require knowing the query shapes upfront - not ideal for ad-hoc workloads)

- firebolt (license makes it challenging to offer to our customers)

- redshift / alloydb / etc (we wanted something cloud-provider agnostic)

And we shortlisted 3:

- pg_clickhouse (Postgres extension that parses SQL in Postgres and pushes the work down to ClickHouse)

- cedarDB (closed-source, Postgres-compatible analytical database)

- duckdb (open-source, embedded columnar analytics engine with a Postgres-like SQL dialect)

We needed to know how they would perform on real postgres queries, so we took a backlog of 5,410 (hand-written) queries (chosen because they had been slow to execute against postgres) from 159 real postgres databases. We then generated synthetic data (dynamically using the schemas from those 159 databases) to fill 159 local databases so we could run the experiment.

We then spun up the 3 short-listed tools locally, and ran each of the 5,410 queries against both postgres and the 3 tools, and compared the results:

- pg_clickhouse (matched postgres 59.4% of the time, refused 39.9% of the queries and was “wrong” 0.8% of the time).

- cedarDB (matched postgres 88.1% of the time, refused 8% of the queries and was “wrong” 3.9% of the time).

- duckdb (matched postgres 84.1% of the time, refused 14.3% of the queries and was “wrong” 1.6% of the time).

Matched meant they returned exactly the same result as postgres. Refused meant they returned an error message (usually telling you some syntax isn’t recognised). And “wrong” meant they didn’t return the same results as postgres. I appreciate that arguably postgres may be the one that is wrong in some cases - but for our use case, we considered postgres the golden source of truth.

So, both duckdb and cedardb performed pretty well (correctly handled more than 80% of the postgres queries we threw at it), out-of-the box. But we really still wanted to try and cover that long-tail.

We chose duckdb as its open-source license would allow us to easily work on the long tail to get the postgres SQL parity we wanted.

So, Mason (linked above), is what we built, powered by duckdb, which now matches postgres on 96% of our 5,410 queries, plus hundreds of other queries that we added, testing it with Metabase, Grafana, Superset, DBeaver and Trevor.io. For the remaining 4%, it errors with a nice clear message telling you how to rewrite your SQL.

We’d love your feedback on what we’ve built. Useful? How can we make it better?

Show HN: Mason – a lightweight Postgres read-replica, built on columnar storage

https://masondata.ai/
19•tagspace•2h ago•0 comments

Show HN: Brickie – deploy sandboxes in your own AWS account

https://github.com/hatchet-dev/brickie
3•abelanger•2h ago•0 comments

Show HN: Strict MCP schemas rejected 10/10 bad calls; loose schemas: 0/10

https://github.com/ranadhir19/mcp-server-lab
2•ranadhir19•2h ago•0 comments

Show HN: Drive around my village in 3D

https://cherwellvalleymotorclub.app
126•johnwards•4d ago•89 comments

Show HN: Type-C – variants, options, generics and pattern matching for C

https://github.com/stass/type-c
48•stass•1d ago•21 comments

Show HN: Open-Interpretability Explain

https://open-interpretability.com/posts/explain/index.html
9•sackfield•4h ago•1 comments

Show HN: Ditching Markdown for an interactive AI Agent guide in pure HTML

https://qufei1993.github.io/ai-agent-guide/en/index.html
3•qufei1993•4h ago•0 comments

Show HN: We replaced our time tracking SaaS with a Git repository

https://github.com/clockoli/clockoli
6•snikolaev•6h ago•0 comments

Show HN: Genesis Map – Visualize your agent's changes. See where they can break

https://github.com/GenesisAgentInfra/genesis
13•willlzl•13h ago•0 comments

Show HN: Rowkeep – an append-only database that lives inside a Claude artifact

https://github.com/cklose2000/rowkeep
3•cklose2000•6h ago•1 comments

Show HN: Agent-first-browse – Web automation with delta snapshots and LangGraph

https://github.com/SandeepAi369/Agent-first-browse
9•SandeepCh369•16h ago•0 comments

Show HN: WearTryOn – Client-side virtual try-on for e-commerce

https://weartryon.com
2•summerjaiyi•6h ago•0 comments

Show HN: BongBong – A tank shooter and world builder

https://bongbong.io/
5•otobrglez•6h ago•3 comments

Show HN: Scriptopus: Free screenwriting editor –. reimagined

https://scriptopus.com/
2•umutm•7h ago•0 comments

Show HN: Build planning, analytics and data apps with AI, no license fees

https://maverickbuilds.app/
2•ktokarev•7h ago•1 comments

Show HN: I Created Command 2120, Online Browser RTS Game Inspired by Red Alert 2

https://command2120.pvpdock.com/
2•b4rtazz•7h ago•0 comments

Show HN: The Definite C64 IDE for Windows. All in One. Written in Rust

https://x64ide.com/
2•mmethodz•7h ago•1 comments

Show HN: FireVoice, free open-source voice studio on your own GPU

https://firevoice.fabwaseem.com
14•fabwaseem•15h ago•3 comments

Show HN: Graticule, turn oscilloscope screenshots into CSV data and plots

https://github.com/SunSinD/Graticule
4•SunSinD•15h ago•0 comments

Show HN: I built a game where you are an LLM's subagent

https://github.com/gulivan/worker755
359•ivantgam•2d ago•89 comments

Show HN: Harny – AI coding agent for VSCodium/VS Code tuned for small/local LLMs

https://harny.dev/
4•spltek•9h ago•0 comments

Show HN: Horsebin – an xkcd-inspired paste bin with a 3-word id you can remember

https://staple.horse/
3•bugpower•5h ago•1 comments

Show HN: Just Dashboard, open-source Linux management dashboard

https://just-dashboard.com/
5•Wayy10•21h ago•0 comments

Show HN: Sessions Pro for Codex – two ChatGPT desktop accounts open at once

https://multiplecodex.com/
4•lexmedia•18h ago•0 comments

Show HN: Narayanastra – agentless Linux rootkit scanner (eBPF, io_uring) in Rust

https://github.com/Tekush1/narayanastra
6•cyberhx•21h ago•0 comments

Show HN: Amni-CAD – parametric CAD with stress and flow simulation in a browser

https://amni-scient.com/amni-cad
8•amnibro7•19h ago•0 comments

Show HN: Rchive – Every drive I've owned since the 90s, searchable in one window

https://www.rchive.computer/
2•kevinsync•11h ago•1 comments

Show HN: One hour of AlphaZero-style Othello training on only one MacBook Air

https://github.com/natsu0529/mac-alpha-zero
4•natsu529•11h ago•1 comments

Show HN: Ant – A scripting language with goroutines and static types

https://ant-lang.org/
15•medv•11h ago•5 comments

Show HN: Zero C# – C# without a runtime or GC

https://onurgumus.github.io/zero-csharp/index.html
179•reverseblade2•3d ago•136 comments