Skip to content

Mason: a Postgres read replica that is really DuckDB inside (and 84 times faster at counting rows)

Published on 26 November 2026

By Vicente Bonillo Alejos

Dos cajas de fichas ordenadas de forma distinta sobre una mesa, unidas por un cable, con una persona de espaldas mirando un reloj de arena.

What it is

On 24 November 2026, Mason was posted to Show HN: a Postgres read replica that is not Postgres inside. It is open source under Apache-2.0, and it comes from the team behind Embeddable and Trevor.io. They also offer a hosted version with free access, according to their own site.

The idea in one sentence: a single Node.js process that copies whichever tables you choose from your Postgres, stores them in DuckDB —a columnar analytics engine, meaning it stores data by column rather than by row— and rewrites your queries on the fly so DuckDB runs them as fast as possible, while returning what Postgres would have returned.

You install it as a global npm package, point it at a connection string, pick tables and start it. All the configuration and the synced copy of your data stay in the folder you launch it from, and there is a command to delete that copy when you are done. Syncing can be on demand, by polling, or by logical replication —Postgres's own mechanism for streaming changes as they happen.

The problem it solves, with numbers

The origin story is the usual one: analytical queries choking a production Postgres. They tried plugging in ClickHouse and hit two walls: a learning curve to tune it, and a SQL dialect noticeably different from Postgres. For ad hoc workloads —queries you cannot predict— it did not fit.

So they ran a proper test: 5,410 hand-written queries, chosen because they were slow, taken from 159 real Postgres databases, plus synthetic data generated from those same schemas. Against that bench they measured three candidates, comparing results row by row against Postgres:

ToolMatchedRefusedDifferent result
pg_clickhouse59.4%39.9%0.8%
cedarDB88.1%8%3.9%
DuckDB84.1%14.3%1.6%

They picked DuckDB because its licence let them work on the long tail, and built Mason on top of it: it now matches Postgres on 96% of those 5,410 queries, and on the remaining 4% it returns an error telling you how to rewrite the SQL. They also tested it with Metabase, Grafana, Superset, DBeaver and Trevor.io.

The speed figures they publish, on a modest AWS machine (4 vCPU, 16 GiB) and from a cold start: a grouped count over 10 million rows with 10 concurrent clients drops from 21.721 seconds on Postgres to 0.2595 on Mason, 84 times faster. The same count over 100 million rows with one client, from 216.068 to 0.4624 seconds. A revenue-by-month join over 100 million rows, from 335.059 to 6.685 seconds.

Who it is for, and who it is not for

It is for you if you run a production Postgres with large tables and a dashboard on top —Metabase, Grafana, whatever— hammering it with counts, sums and group-bys. Also if you are giving read access to an AI agent and it makes you uneasy, rightly so: Mason ships role-based access control (each user sees only the tables and columns it should), row-level security that follows foreign keys, a log of every query with who ran it and how long it took, IP allowlists, TLS and its own MCP server.

It is not for you if your workload is point lookups. They say so themselves without sugar-coating it: fetching one order by primary key takes 0.2341 seconds on Mason versus 0.0388 on Postgres, six times slower. And it writes nothing: it is a read replica.

What I would do from today

  1. Look at your slow queries first. If they are aggregations over many rows and few columns, this fits; if they are point lookups, leave everything alone.
  2. Set it up against a copy, not production. Logical replication takes a slot and consumes resources on the primary, and that has to be measured first.
  3. Run your real queries through the 4%. The number that matters is not theirs, it is how many of your queries break.
  4. Decide where that folder of synced data lives. It is one more copy of customer data, with everything that implies.

For context: on Google Trends (worldwide web searches from 26 August to 25 November 2026, checked on 26 November) the term «mason postgres duckdb» shows an average interest of 1 out of 100 relative to other tools queried at the same time. It is a relative value and there is no basis to calculate a change. Translation: it has just been born and nobody is searching for it yet.

What does not change

Mason does not replace Postgres and does not claim to. Your data in there is stale: as stale as your sync mode says. The speed numbers come from the vendor, measured by the vendor, with its own bench and synthetic data; useful for order of magnitude, not for signing anything. And 96% is their long tail, not yours.

It also does not remove operational work: it is one more process to start, watch and update. It ships Prometheus metrics, a health endpoint and logs to standard output, but that means it makes your life easier, not that it runs itself.

Our take

I like it, and I like it for an unglamorous reason: the merit here is not the engine —DuckDB already existed and was already fast— it is the glue. What they did was push Postgres dialect compatibility from 84% to 96%. That is dirty, months-long work with no pretty screenshots, and it is exactly what lets a tool go into a client's setup without rewriting their dashboards.

What I think will age poorly is the «swap it in and you are done» promise. A 4% failure rate sounds like nothing until the query that fails is the one in the report the boss reads on Mondays. I would frame it the other way round: not as a replacement for your replica, but as an analytical cache for a handful of specific dashboards that are suffocating the primary today. With that framing, the 4% is manageable; with the other one, it disappoints.

And I have seen this film before: for years, the answer to «the dashboard is slow» was building an ETL into a cloud warehouse, with its infrastructure, its monthly cost and its dedicated person, to serve three people who look at a chart once a week. If a folder and a Node process solve that case, the saving is not in milliseconds, it is in complexity. Two warnings, though: there is a small team behind it and the project is days old, so treat it as the young thing it is. The consolation is that the Apache-2.0 licence and the fact that everything lives in one folder mean the exit cost is deleting that folder.

When someone asks us for a dashboard on top of their ERP data, the bottleneck is almost never the database engine: it is deciding what leaves production, how fresh it has to be and who may see it. That Mason ships roles, row filtering and query logging out of the box strikes me as more interesting than the 84-fold speed-up.

Worth an afternoon? Yes, if you have the problem. If you do not, walk on by.

Any questions, tell me and we will look at it.

Best, Vicente.

Source: Show HN · Via: Show HN

Did reading this raise a question?

Ask us. We answer even if you never become a client.