---
title: 'pg_mooncake is gone, long live mooncake'
description: 'And the case for the LTAP dream'
excerpt: >-
  Almost three years ago, we started Mooncake with a bet that Postgres and the
  lakehouse would be the data stack for the next generation of apps...
date: '2026-12-01T09:00:00'
category: product
categories:
  - product
authors:
  - zhou-sun
  - pranav-aurora
  - cheng-chen
cover:
  image: https://cdn.neonapi.io/public/images/pages/blog/pg-mooncake-is-gone-long-live-mooncake/cover.jpg
  alt: pg_mooncake is gone, long live mooncake
isFeatured: false
seo:
  title: 'pg_mooncake is gone, long live mooncake - Neon'
  description: 'And the case for the LTAP dream'
  keywords: []
  noindex: false
  ogTitle: 'pg_mooncake is gone, long live mooncake - Neon'
  ogDescription: 'And the case for the LTAP dream'
  image: https://cdn.neonapi.io/public/images/pages/blog/pg-mooncake-is-gone-long-live-mooncake/social.png
---

<Admonition type="note" title="TL;DR">

- pg_mooncake and pg_duckdb are now deprecated on Neon. Existing projects will keep working as they do today, but new projects can't install them.
- [pg_mooncake](https://github.com/Mooncake-Labs/pg_mooncake) has been upgraded, and is now open to the community for contributions. Feel free to reach out in the [Neon Discord](https://neon.com/discord).
- With [LTAP](https://www.databricks.com/blog/lakebase-ltap-rethinking-database-storage) (Lake Transactional/Analytical Processing) we can deliver [analytics on Postgres tables without any replication or lag](https://docs.databricks.com/aws/en/oltp/projects/query-lakehouse-rt). It's a key part of [Lakebase Postgres](https://neon.com/lakebase) on the Databricks platform and will soon come to Neon.

</Admonition>

Almost three years ago, we started Mooncake with a bet that Postgres and the [lakehouse](https://www.databricks.com/glossary/data-lakehouse) would be the data stack for the next generation of apps. We had spent most of the last decade working on bringing OLTP and OLAP databases together, and Postgres plus the lakehouse felt like the right combination.

So we built [pg_mooncake](https://neon.com/docs/extensions/pg_mooncake), a Postgres extension that adds columnstore tables for analytics. It keeps a columnstore copy of your data with very little lag. At its core, though, it's still a replication engine, and we learned the hard way that [CDC](https://www.databricks.com/glossary/change-data-capture) replication isn't the right way to bridge OLTP and OLAP (read more below).

That's why we're deprecating pg_mooncake on Neon. What's coming is a lot better. Over the last year we've been building LTAP, which lets you run fast analytics directly on your Postgres tables with no CDC pipeline and no lag. LTAP is coming to Neon. Analytics in Postgres done the right way.

## The mooncake story

In 2024, we looked at [Iceberg](https://iceberg.apache.org/) for the first time and immediately realized that any system that wants to own its storage is doomed.

The "operational" layer had to be rebuilt on the lake.

We called [Nikita](https://www.linkedin.com/in/nikitashamgunov/). One week later, we were on a Zoom with Khosla Ventures investors. After the meeting, we got a message saying, "It's a 5/10 pitch, but here's some money."

The bet was right. But we were struggling anyway.

We were a connector between Postgres and the lakehouse, and a connector doesn't own either side. The only way to survive was to become a CDC tool.

Then one Sunday, Nikita called again. [Neon had just joined Databricks](https://neon.com/blog/neon-and-databricks), and his pitch was one question: "Do you want to be a CDC tool, or do you want to solve the data problem?"

The journey since has been more exciting than we imagined. It's rare luck to work on something meaningful ([Lakebase](https://neon.com/lakebase)), something we're good at (TP + AP), and something we're genuinely interested in (Data + AI), all at once.

<Admonition type="note" title="Context">
Neon joined Databricks in May 2025 ([announcement](https://neon.com/blog/neon-and-databricks)), and [Mooncake Labs followed in October 2025](https://www.databricks.com/blog/mooncake-labs-joins-databricks-accelerate-vision-lakebase). Neon's storage architecture is the foundation of Lakebase, and the database you run on Neon today is [Lakebase Postgres](https://neon.com/lakebase).
</Admonition>

## HTAP is really, really dead

Last year we wrote a post saying [HTAP is dead](https://neon.com/blog/htap-is-dead). If you ask Google "is HTAP dead," it says yes, based on that post :)

That post ended with a question: how do we CDC from our [OLTP](https://www.databricks.com/glossary/oltp) system to the [data lake](https://www.databricks.com/glossary/data-lake) efficiently?

Mooncake was our attempt to answer it.

The first [pg_mooncake](https://github.com/Mooncake-Labs/pg_mooncake) was a columnstore table in Postgres, arguably the first system to put metadata in a database and data in [Parquet](https://parquet.apache.org/). We're glad to see [DuckLake](https://ducklake.select/) take that design to another level.

It taught us two hard lessons:

- Cloud providers won't let you install your own Postgres extension.
- For OLTP, customers want Postgres semantics. 100% of them.

So we built [Moonlink](https://github.com/Mooncake-Labs/moonlink), the best (maybe the only) OSS zero-ETL solution between Postgres and Iceberg, and rebuilt pg_mooncake on top of it.

Then we stopped. A year ago, we were preparing a [CH-benCHmark](https://db.in.tum.de/research/projects/CHbenCHmark/) run for a Postgres conference talk. We ran [TPC-C](https://www.tpc.org/tpcc/) and started watching our Iceberg table.

It blew up on a tiny table: 10 rows, overwritten again and again.

Rapidly rewriting a small table, or a small part of a big one, is a common OLTP pattern. On the lake side it means 100x amplification across ingest, index lookups, and compaction.

"Damn, we are building a niche system again."

A system for the 0.1% who know they need a fast dashboard on their freshest data, and are willing to set up a whole stack around it.

That's the curse of HTAP. It turns out the curse follows you into CDC.

## LTAP: columnstore is a storage optimization

At Databricks, we got another chance to look at the OLTP/OLAP divide from first principles, with the best possible team.

In classic Postgres, your data lives in files on one machine, and the only way out is through the database: a query, or [the replication stream](https://www.postgresql.org/docs/current/logical-replication.html). That's why every analytics-on-Postgres product is really an extraction tool. The original pg_mooncake extracted from the inside, as an extension. Moonlink extracted from the outside, as CDC.

Lakebase changes the premise. [The WAL](https://www.postgresql.org/docs/current/wal-intro.html) and data files are no longer on a single machine; they live in [separate, scalable storage](https://neon.com/docs/introduction/architecture-overview). Your data is already out, all of it, for every table. There is nothing to extract.

So the columnstore moves into storage. The storage layer was already compacting pages in the background. Now it also writes them to the lake in an open columnar format. The conversion is lossless, so the original pages can be rebuilt from the columns. Postgres keeps reading pages, and analytical engines read columns.

You don't set it up, the same way you don't set up a [checkpoint](https://www.postgresql.org/docs/current/wal-configuration.html). There is no list of tables to opt into. A query sees everything committed before it started. And our 10-row table? Tiny hot tables just stay in the page cache. The storage layer decides what's worth columnarizing. The workload that broke our CDC approach becomes a non-event.

HTAP tried to build one engine that does everything. CDC built a second database. LTAP is neither. It's Postgres, with smarter storage.

<Admonition type="note" title="Go deeper">
Reynold Xin's [From monolith to Lakebase to LTAP](https://www.databricks.com/blog/lakebase-ltap-rethinking-database-storage) walks through the architecture from the storage layer up. [Dispelling LTAP myths](https://www.databricks.com/blog/dispelling-ltap-myths) covers the common objections: whether one copy of the data means slow lookups or slow scans, whether lake tables are always stale, and why logical replication is a different thing.
</Admonition>

## The future is agent native

Here is why this matters more now than it did a year ago.

Every agent gets a database. Every session, every app an agent spins up, every [branch](https://neon.com/docs/introduction/branching) it creates. Agents create tables and workflows faster than any human can.

Now ask a simple question: what happened across all of those sessions?

You can't build a pipeline for that. Nobody is going to create [a publication and a slot](https://www.postgresql.org/docs/current/logical-replication.html) for a database that was born four seconds ago and may be gone in an hour. Either the data is in the lake the moment the table exists, or it's invisible.

And analytics is only one access path. Agents need search too, which used to mean a separate search engine and another pipeline. So we built it in: [Lakebase Search](https://neon.com/docs/ai/lakebase-search) gives you [vector](https://github.com/pgvector/pgvector) and [BM25](https://en.wikipedia.org/wiki/Okapi_BM25) search directly in Postgres. One table, many ways to read it, nothing to sync.

That's the LTAP dream.

## Thank you for sharing the mooncake with us

Mooncake was a community effort. Thank you to everyone who used it, and especially to our open source contributors. We've been quiet for a while as we figured out the right direction and building blocks for LTAP. We're still around on the [Neon Discord](https://neon.com/discord).

pg_mooncake is gone. Long live mooncake. 🥮
