r/PostgreSQL • u/CautiousUse8597 • 14h ago
How-To Load terabytes of data in minutes into Lakebase Postgres
databricks.comSaw this new post on the Databricks blog about loading huge amounts of data into Lakebase Postgres and thought the approach was interesting enough to share.
The usual problem: bulk loading into Postgres goes through COPY. Spark can read source partitions in parallel, but every row still ends up funneled through a single Postgres writer, and that same primary is serving your live app traffic. So a big load either takes forever or hurts your OLTP latency.
Their fix (LTAP Direct Writes, currently in beta) flips it around. Spark builds valid Postgres heap pages and primary key indexes itself, in parallel, and writes them straight to storage. The pageservers validate checksums when they ingest the files to catch corruption. The primary only publishes the final result through a small WAL record, so live queries aren't affected.
Numbers they claim:
- Up to 147x faster loads
- 1 TB in under 5 minutes in internal benchmarks (that's heap page build time)
- Throughput scales almost linearly as you add Spark capacity
- Multiple large loads into the same destination can run concurrently
The motivating case was a beta customer syncing roughly 1 billion rows a day via Synced Tables, who had to heavily overprovision their OLTP compute just to survive the sync, even with autoscaling.
They also say it's built with Postgres extensions and a table access method, no changes to Postgres core, so it should still behave like regular Postgres.
Curious if anyone here has tried it yet. How does this compare to what you're doing now for reverse ETL or serving lakehouse data to apps?