Moving our warehouse off DuckDB posthog.com · 54 points · 24 comments · HN threa...
HN Best 200 @best
Moving our warehouse off DuckDB posthog.com · 54 points · 24 comments · HN thread
TL;DR PostHog says it is moving its data warehouse off DuckDB, five months after rebuilding it on DuckDB instead of ClickHouse. The post says DuckDB and its DuckLake format hit limits at about 2 PB and roughly 1 trillion rows, and that Postgres connections were hard to scale, so PostHog is rebuilding on its own Trino flavor with a new open table format called HogLake.
- PostHog moved to DuckDB about five months ago because a shared ClickHouse cluster could not handle hours-long modeling queries and lacked a cost-based optimizer.
- Single-node DuckDB needs the worker sized before a query runs, and customers' queries were more complex than expected, forcing very large instances.
- DuckLake's portable catalog schema limited optimizations; a single-table write could take over three minutes, and over 99% of catalog statistics rows belonged to deleted tables.
- At about 2 PB (roughly 1 trillion rows and 15.3 million snapshots), PostHog carried patches in a DuckLake fork because upstream changes could not land fast enough.
- Direct Postgres connections on port 5432 were hard to scale compared with HTTP, given reconnects, idle connections, load balancing and client compatibility.
- The new stack is a custom Trino derivative with HogLake, being tested first on PostHog's own petabyte-scale data before design partners.
Discussion The thread is largely skeptical. Many commenters say the post lacks measurements, methodology and concrete failure data, and read it as marketing or as churn: a company that switched from ClickHouse to DuckDB and then to Trino within about a year. Several question how the growth estimates were so wrong, and one compares it to teams that change stacks every six months. Others are more forgiving, noting that engineering experiments are worth sharing and that maintaining a fork at scale is normal. Side remarks cover the website design and cookie banner, and a few note the broader trend of teams building in-house data lakes.
- Post lacks technical detail and measurements (most): Many commenters say the article offers little data on benchmarks, query patterns, or what specifically failed, so the reasoning cannot be checked. They want methodologies and explicit failures.
- Rapid stack switching signals poor planning (many): Several argue that moving to DuckDB and then away within about five months shows weak capacity planning or a habit of migrating rather than tuning. Some suspect the post was written to claim victory early.
- Blaming the database may be misplaced (some): One commenter compares it to ORM users who blame the database without analyzing queries and indexes. Another asks whether DuckDB's Quack client-server protocol could have helped with scaling.
- Estimating query cost up front is the key insight (some): A commenter sees the real lesson as needing cost estimates before routing queries to per-customer instances, as Snowflake does with its optimizer.
- Learning from experiments is worth sharing (a few): A defender says engineers like to experiment and readers benefit from the experience, and that maintaining a fork is a normal part of influencing upstream projects at large scale.
- Website design and cookie banner criticized (a few): Some commenters find the PostHog site hard to use or ugly and object to a cookie banner shown when only essential cookies are used.
Links from the comments