Every few months somebody on my feed announces that DuckDB is about to replace your data warehouse. I've been through enough "this replaces everything" cycles to know how the third act usually goes. The companies that tried it quietly migrate back, and nobody writes the autopsy.
PostHog wrote the autopsy. On Nov 2, 2026, they published Why we're moving our warehouse product off DuckDB, and it's the most useful thing I've read this year about warehouse architecture. When they left, their DuckLake catalog held about 2 PB, roughly 1 trillion rows and 15.3 million snapshots. They're moving to their own flavor of Trino and a new open table format they call HogLake.
My thesis is that PostHog ran DuckDB hard, found the edge of its design center and wrote down exactly where that edge is. If you're a Data Engineer prepping for a system design interview, that writeup shows the tradeoff reasoning interviewers want better than most answers I've heard from candidates, on either side of the table.
What PostHog hit at 2 PB with DuckDB
Timeline first, because the internet is already garbling it. In June, Eric Duong explained why PostHog rebuilt its warehouse on DuckDB. The reasons made sense. Their shared ClickHouse cluster was built for queries that finish in minutes, and it couldn't absorb modeling jobs that run "for hours or even days." ClickHouse also lacked a cost-based query optimizer. So each organization got a single-tenant DuckDB instance that slept when idle. ClickHouse stayed on for analytics data (remember that part; it matters later).
By November, PostHog describes that DuckDB design as about 5 months old. They say the team spent the previous 3 months re-architecting without it. 3 problems drove the move:
- Workers had to be sized up front. In PostHog's words: "To run a single-node engine safely in the cloud, we have to size the worker before the query arrives." Customers ran more complex queries than expected, so they had to add huge instances. Spilling to disk was too slow and costly. Adding disks made queries too slow and expensive to be viable.
- Catalog writes were slow. A single-table write could take more than 3 minutes, because every commit re-read the statistics for the entire catalog. Over 99% of those statistics rows belonged to tables that no longer existed.
- Postgres wire connections were a constant fight: no automatic reconnects, painful TTL and idle-connection management, expensive long-running connections, and very little tooling for load balancing pgwire compared with HTTP.
There's a 4th problem that's quieter but just as expensive. They couldn't land changes upstream as fast as they needed, so they carried patches in a fork. Anyone who's maintained a fork knows what that means: every upgrade turns into an archaeology project.
Reread the sizing quote and you'll see PostHog never says DuckDB is slow. DuckDB's own performance docs say larger-than-memory workloads are supported by spilling to disk. They also say that "it is not a primary design goal for DuckDB to quickly execute many small queries concurrently," and that a query with multiple blocking operators "may still throw an out-of-memory exception." The DuckDB team documents its design center. PostHog's workload sat outside it.
Some napkin math, and this is my arithmetic, not anything PostHog published. DuckDB's environment guide suggests 3 to 4 GB of memory per thread for join-heavy work. On a 16-thread instance, that's 48 to 64 GB of RAM just for thread budgets, and you have to commit to it before you've seen the customer's query. Multiply that by every tenant who might wake up and run a 6-way join against a year of events.
PostHog admits it directly: "We couldn't find a good way to tell customers what resources their queries would need."
When your customers write the SQL, capacity planning turns into an unbounded-cost problem. At 2 PB, PostHog's wall was a predictability problem, not a speed problem.
Now apply the economics. Oversized instances cost money, while fork maintenance and cleanup jobs that never stop running both cost engineer time. Compute is cheap and engineers are expensive, and this architecture was eating engineer time at every layer.
The catalog is part of your data warehouse, and data engineers forget it
Most "DuckDB replaces your warehouse" arguments come down to benchmark charts: query speed on a laptop against a few hundred GB. PostHog's worst write-path problem was in the metadata.
Cleaning up the dead statistics rows made writes 30 to 50 times faster. Then, in the post's words, "the rows kept growing back." That's the detail I keep coming back to. A one-time cleanup gives you a one-time win. If the rows keep coming back, something in the write path never garbage-collects stats for dropped tables. The post doesn't say which process was at fault, and I won't pretend I know.
Be careful with the headline number, too. 15.3 million snapshots sounds like the obvious cause, but PostHog never says snapshot count caused the 3-minute writes. The mechanism they name is stale statistics plus a full-catalog stats re-read on every commit. "Just expire snapshots" doesn't fix that. The DuckLake docs on expiring snapshots say data is physically removed only by expiring the snapshots that refer to it, and that expiration doesn't immediately delete unreferenced files; you need a separate cleanup step for those. That's storage reclaim. It does nothing for the statistics bottleneck PostHog described.
I once spent most of a week on a "slow warehouse" ticket. The cause turned out to be a partition metadata table nobody had pruned in years. The data was fine; the bookkeeping about the data was the bottleneck. Every DE eventually learns that the metadata needs a lifecycle just like the data does, and most of us learn it at 2am.
Connections are the same kind of issue. PostHog says they spent a lot of time on how many connections DuckLake opens to metadata databases, which hurts "on shared Postgres instances, where every connection has a real cost." Using a SQL database as your catalog is a neat idea until hundreds of writers are fighting over its connection limit.
The pgwire story points the same way. PostHog says there's "an endless list of Postgres clients, and each expects its own niche Postgres behavior," and their compatibility fixes were never good enough. Their DuckDB-backed pgwire server, Duckgres, has a README saying PostHog stopped developing it on October 8, 2026. I read that as a product-scope decision: chasing every client's quirks cost more than it was worth. I don't read it as proof that pgwire can't scale; a pooler in front of the server would plausibly absorb some of that connection cost. Their pain was real, but it was specific to what they were running.
If you run any lakehouse catalog, here's what I'd do:
- Find out where your metadata lives, whether that's Postgres, a REST catalog, Glue or files in a bucket, and what it costs per connection.
- Assign an owner for cleanup. When a table gets dropped, something has to delete its stats, its snapshots and its orphaned files, so name that process and the team that runs it.
- Put row counts for your catalog tables on a dashboard next to data volume, so metadata growth gets tracked like any other metric.
Why PostHog moved toward Trino, and what data engineers should read into it
PostHog is now building its own Trino flavor and its own table format. That's the opposite of the "one embedded engine and a bucket" pitch, and their stated reason is that they needed control over both the engine and the format.
Look at Trino's shape. Per the Trino concepts docs, there's 1 coordinator and zero or more workers; the coordinator parses, plans and manages the workers. My read, which PostHog doesn't say explicitly: a coordinator spreading work across a pool goes straight at "size the worker before the query arrives." You stop betting the whole query on one box.
Now the skeptic's part. On HogLake, the post gives one fact: PostHog is testing it at petabyte scale before design partners get access. Benchmarks, cost figures, a migration plan and an availability date are all missing. That's a stated direction, and anybody telling you HogLake has solved these problems is ahead of the evidence.
Also look at what PostHog didn't throw away. ClickHouse stayed for analytics when the warehouse moved. Both of their big decisions this year came down to elasticity, meaning how compute gets scheduled against workloads you don't control: first unbounded queries on a fixed ClickHouse cluster, then a single DuckDB instance sized ahead of time for each query.
The tools change every 18 months and the problems don't. Elasticity, metadata hygiene, protocol choice and who controls upstream were problems before DuckDB, and they'll still be problems after HogLake.
Using the PostHog post in a data engineering system design interview
DE system design loops ask about pipeline and warehouse architecture: where the data lands, where the metadata lives, who queries it and what breaks first. Your load balancer diagram from generic prep won't get you far there. The PostHog post gives you a full worked example.
Say you get "Design the warehouse layer for a multi-tenant SaaS analytics product." Here's the order I'd talk through:
- Who writes the queries? If it's your own analysts, you can size for known workloads. If customers write arbitrary SQL, resource needs are unbounded and you need either elastic distributed compute or hard limits. Say that out loud. It's the PostHog sizing lesson in one sentence.
- Split workloads by shape. Short interactive analytics and hours-long modeling jobs shouldn't fight over one cluster. PostHog kept ClickHouse for one and moved the other. Splitting the workload is often the right answer before replacing anything.
- Where's the catalog, and how does it get garbage-collected? Most candidates skip this completely. Ask how stats for dropped tables get cleaned up and who owns that job. Interviewers notice when you ask it.
- What protocol do clients use? Pgwire buys you compatibility with every BI tool and a long tail of client quirks. HTTP gets you better routing and load-balancing tooling. Pick one and defend it.
- Who controls the format's release cadence? An open format still depends on its maintainers. PostHog ended up running a fork. Mentioning upstream velocity as a risk sounds like someone who has actually maintained a fork.
Then the move that separates senior from staff: name your exit criteria. "I'd start on single-node DuckDB because most tenants are small and it's cheap to run. I'd move to distributed compute when we can't predict per-query memory, or when catalog commit latency crosses a threshold we've agreed on." That's a better answer than picking the "right" tool, because it shows you know your choice has a shelf life.
I've watched people with 10 YOE get downleveled because they named a stack and couldn't say when it would break. The interview is a different skill from the job; treat prep like a job. The system design round is only half the loop. The other half is still coding, and if your target shop runs Spark, pyspark interview questions are what DataDriven is good for. It's the best practice I've found for that round. Get the coding round automatic so your head is clear for the tradeoff conversation, which is where levels get decided.
Before the takes arrive: DuckDB is fine. At most companies, which have medium data and big egos, a single-node engine is plenty. PostHog's lesson is about the edges: 2 PB, a trillion rows and customers writing SQL nobody can predict. Know where your workload sits relative to those edges, and you'll make better calls at work and in the interview.
So here's my question for y'all: what's the specific, measurable trigger that would make you leave the warehouse stack you run today, and have you actually written it down?
Top comments (0)