The checkout service and the revenue dashboard can now share a connection string. They can’t yet share bytes.
That’s my read of “one database for transactions and analytics” as of June 2025. Both clients point at something like postgres://db.internal:5432/shop and get checked against the same roles. Underneath, the fast analytic path reads a columnar copy of what checkout wrote.
The direction is right. The slogan has just gotten ahead of the storage engine.
What the embedded engines changed
Postgres stores rows together because transactions touch whole rows. Analytic queries touch a few columns across millions of rows, and a row layout makes them drag every other column through memory to get there. That mismatch is why warehouses exist.
Two extensions have narrowed it from the Postgres side. pg_duckdb runs DuckDB inside the Postgres process, so an analytic query can be handed to a vectorized engine, and an ordinary session can read Parquet and Iceberg files sitting in object storage. pg_mooncake adds columnstore tables: you create a table with a columnar access method, the data lands as Parquet with Iceberg or Delta metadata, and DuckDB does the scanning. DuckDB itself reached 1.0 a year ago with a stable file format, which makes embedding it a much smaller bet than it was.
Both extensions are young. I’d read their release notes before I put a revenue number behind either one.
The money agrees with the direction. In May a lakehouse vendor agreed to buy a serverless Postgres company.
The fast path reads a copy
Pointing a vectorized engine at ordinary Postgres tables helps some, but the scan still walks row pages. The big speedups come from columnar files, and those files are a second copy of the data. Either you write to a columnstore table directly, which makes it a poor home for checkout rows, or something keeps it in step with the row tables your transactions write.
That’s fine as long as nobody pretends the copy isn’t there. A copy raises questions a single table never does: how far behind is it, and whose CPU and disk pay to refresh it and to scan it.
The old reasons to protect the write path haven’t retired, either. An analytic query on the primary competes with checkout for cores, memory and I/O. A long one holds back vacuum. A replica has its own trade between cancelled reports and bloat on the primary, which I went through in the post on when to split off a warehouse. Embedding a faster engine makes the scan shorter. It doesn’t change who the scan is competing with.
Elmstead Hardware’s 46 seconds
Elmstead Hardware, a chain I’ve made up, runs a 90-day revenue-by-category query every morning, and every number in its story is illustration.
On the read replica it takes 46 seconds, which is long enough that people stop exploring and start exporting. An engineer adds a columnstore table on the primary, since a replica can’t take writes, and refreshes it every 15 minutes from the order and product tables. The same query comes back in 1.4 seconds.
A few weeks later someone lines up the checkout latency graph against the refresh schedule.
On Tuesday nights merchandising reprices a large part of the catalog in one batch. The next refresh has to pick up every changed row and rewrite columnar files, on the same cores and the same disk that serve checkout. Checkout latency doubles for as long as the refresh runs. The 1.4-second query is innocent. The work of keeping the copy current is what hurts, and it runs on the one host that can least afford it.
The fix is to move the copy. A physical replica still can’t own a writable table, so it goes to a second Postgres instance fed by logical replication, with the extension installed there. The query stays fast. Staleness now includes replication lag, and the application has two connection strings again. Elmstead ended up with one database product on two hosts, which is a good place to be and a smaller claim than the slogan makes.
A placement table to argue over
The staleness column is the one I’d expect to change first, once you measure your own replication lag.
| Home | Query class that belongs here | Staleness | Isolation from the write path | What it costs |
|---|---|---|---|---|
| Primary, row store | Point lookup by key, inside a transaction | None | None, it is the write path | Nothing extra, but every slow query is paid for by checkout |
| Read replica, row store | Operational report over hours or days of rows | Replication lag, usually seconds | CPU and I/O are separate; long queries fight replay | A second full-size instance; wide scans stay slow |
| In-database columnar copy | Wide scan or aggregate over months | The refresh interval, plus lag if it’s off-host | Poor on the primary’s host, good on its own instance | Second copy of storage, refresh work, a young extension to operate |
| Separate warehouse | Heavy join across sources, long history, many concurrent analysts | Pipeline schedule, minutes to hours | Complete | A pipeline, a second bill, a second set of permissions |
A query class moves down a row only when it breaks the budget of the row it’s in. Elmstead’s report was fine without a warehouse once it stopped sharing a disk with checkout.
Checkout’s budget for analytics is zero
I’d keep point lookups and anything inside a transaction on the primary, and I’d let nothing analytic run there at all, embedded engine or not. Reports that read recent rows can stay on a replica for a long time, and I’ve written up the five numbers I’d watch before splitting anything off.
The in-database columnar copy earns its place for the middle band: scans too wide for a replica, data that all lives in one Postgres, a team that doesn’t want to run a pipeline yet. I’d put it on its own instance from day one and skip the Tuesday-night lesson. How big that instance should be is a separate exercise: size the query, not the dataset.
Before any of that, I’d write two numbers next to each dashboard: how stale it’s allowed to be, and how much extra latency checkout is allowed to absorb on its behalf. The second number is almost always zero, and once it’s written down the placement mostly decides itself.