hn.today

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

masondata.ai99 points21 comments
Screenshot of Show HN: Mason – a lightweight Postgres read-replica, built on columnar storage

Mason is an open-source, Apache-licensed service designed to act as a lightweight read replica for PostgreSQL, especially for analytical workloads. It syncs selected tables and columns from a Postgres database into DuckDB’s columnar engine, then accepts familiar Postgres SQL and adapts queries for faster execution. Data can be refreshed on demand, by polling, or through logical replication. In a cited test on a four-vCPU, 16-GiB machine, a group-by query over 10 million rows took 15.7 seconds on Postgres and 0.193 seconds on Mason, with identical results. Other benchmarks report gains of 16 to 467 times for large aggregations and joins, depending on the test. These figures are workload-specific: primary-key lookups were roughly three to six times slower on Mason.

The intended use is read-heavy reporting, dashboards, and queries from AI agents, rather than fetching a small number of wide records. Mason runs as a single Node.js process, stores its configuration and synchronized data locally, and can be installed and connected through a command-line setup. It also includes per-user access controls, row-level restrictions, query and sync logs, generated tables, monitoring endpoints, TLS and IP allowlists, and a web interface. Built-in MCP support lets agents query permitted data, with activity recorded for review. Users choose what data to replicate and can remove the local copy when finished. The core proposition is to preserve a Postgres-compatible interface while improving scans and aggregations, accepting slower point lookups and the operational responsibility of managing a separate synchronized copy.

Read on masondata.ai21 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

I checked Clojure's core with Lean and found unreported bugs

I checked Clojure's core with Lean and found unreported bugs

Lean formal checks and differential testing of Clojure 1.12.7 uncovered 17 previously unreported bugs, including issues in `vector-of`, HAMT hash collisions, and Java functional-interface calls without type hints. Three million HAMT operations and vector boundary tests found no errors in the core tree structures; the bugs appeared in surrounding code and interactions such as equality and hashing. (s.conao3.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.