Skip to content

Databricks Lakebase: managed Postgres next to your lakehouse

TechFabricUpdated 9 min readVoices

At our Gilbert Databricks User Group on 18 September, we built an app in front of the room. Fifty-one seconds after the call, a governed lakehouse table was online inside its Postgres database, ready to read beside the app's own orders. Going the other way, the app's writes reached Delta in 10 to 15 seconds.

Those two numbers are the case for Lakebase, Databricks' managed Postgres. An application with its own database normally needs a nightly copy job to reach the analytics. That copy is where the order screen and the revenue report start to disagree about the same day. We've already moved a production app across. DealerIQ's TotalLoop matches a dealership's customers who have equity in their vehicle to cars on the lot, and we took it off Cosmos DB and SQL Server and onto Lakebase in waves that could each be rolled back (case study).

It isn't the right home for every database. We'd ask whether the application's data needs to meet the lakehouse's data.

Postgres inside the Databricks platform

Lakebase is open source Postgres, versions 16, 17 and 18, so existing drivers, ORMs and tools connect unchanged (Postgres compatibility). Compute is separate from storage, so it autoscales, scales to zero and branches in seconds. It's generally available (Databricks blog), on Azure since 2 March 2026 (Azure release notes).

At Gilbert the schema was ordinary Postgres, foreign keys and check constraints included, and every client we pointed at it connected without a change. Our own delivery platform, Fabric, has been able to run its Postgres on Lakebase since July. It's an option a deployment switches on, not the default, and building it taught us two things. A Lakebase OAuth token is checked only at login, so live connections outlast it and our pool recycles each connection after six hours to stay well inside Lakebase's three-day connection limit. And Lakebase's built-in PgBouncer pooler doesn't accept OAuth roles, so anything signing in with a Databricks identity has to use the direct endpoint.

What moves when the app and the analytics share a platform

Before the move, TotalLoop's data lived in Cosmos DB and SQL Server. On Lakebase an app's database can be registered in Unity Catalog as a catalog, which brings permissions, lineage and audit logs to operational data (Register in Unity Catalog). At Gilbert, postgres create-catalog took 5.7 seconds, and from then on a SQL warehouse read live Postgres rows in place with no copy. Gold tables also flow into Postgres as synced tables, so the app reads governed numbers instead of its own stale copy. And changes in Postgres flow back out through Lakebase Change Data Feed, in Public Preview, which writes every insert, update and delete as a row in a managed Delta table (Lakebase Change Data Feed).

Application

App-owned Postgres tables

Gold table in the lakehouse

Synced table, read-only

Change data feed

Delta table in Unity Catalog

The app writes to its own tables and reads a synced copy of a gold table, and the change data feed carries its writes back to Delta.

The app owns its tables and writes only there. The gold table reaches it as a synced table, which is read-only, and Databricks recommends only read queries against synced tables (Synced tables). In our session the synced table came online in Snapshot mode 51 seconds after the call, and a re-snapshot ran in about 33 seconds. We kept the synced copy in a lakehouse schema of its own, so the change feed on the app's schema didn't replicate it straight back out again.

The step that fought back was the change data feed. A table's REPLICA IDENTITY has to be FULL before the feed is switched on, or the table is skipped, and flipping it afterwards isn't reliably picked up. We'd put that line in the migration that creates each table, so nobody has to remember it later.

We'd first ask a client how much of the current pipeline budget exists only to move rows between the app and the warehouse, because that's the budget Lakebase can retire.

Sync modes and what each one costs

The sync mode is the main cost setting, and it's the one we'd argue about first, because teams default to the freshest option and pay for seconds they don't use (Synced tables).

Mode How it runs When we'd pick it
Snapshot Copies everything each run More than 10% of source rows change per cycle, where Databricks puts it at roughly 10x more efficient than an incremental sync
Triggered On demand or on a schedule, carrying inserts, updates and deletes Most app lookups; it gets expensive below 5 minute intervals
Continuous Streams with seconds of lag, 15 second minimum interval Only when someone can name the decision that needs seconds

Triggered and Continuous need a change data feed on the source. We'd judge the choice by the pipeline it retires. If the current nightly export, its retry logic and the reconciliation report that checks it can all be switched off, the sync pays for itself whatever mode it runs in. If the old export has to keep running beside the synced table because another system still reads it, the move has added a cost and removed nothing, and we'd find that other reader before syncing anything.

Restores and branches

A branch shares storage with its parent copy-on-write, and point-in-time restore uses the same mechanism (Manage branches). A restore doesn't touch the running branch. It creates a new root branch holding the data as of the chosen moment, the original keeps serving, and the application moves only when somebody repoints its connection (Point-in-time restore).

We like that order, because the restored data can be checked before anything depends on it. At Gilbert we ran an UPDATE that had lost its WHERE, branched from the moment before it with source_branch_time, and repaired the table with an ordinary COPY out and an UPDATE ... FROM back in. That repair assumed nothing else was writing, which is true of a demo and won't be true of a live database. In a client's runbook we'd write the repointing step as its own line with an owner, since a restore nobody repoints changes nothing.

The restore window runs from 2 to 30 days, default 7, and our session project ran on seven. We'd set it to cover the longest gap between a bad write and somebody noticing, and for month-end figures that's longer than a week. Branching for development teams has a post of its own.

Identity for the app's database

Nobody typed a database password at our session. The project set enable_pg_native_login to false, and a person at psql and an application holding client credentials both arrived as a one-hour OAuth token. New projects have had password authentication off by default since 21 May 2026 (release notes), and we'd keep it off.

That moves the question of who may sign in to the app's database into the workspace groups a security team already audits (Create Postgres roles). What each role may read and write is still a Postgres grant, separate from Unity Catalog, so we'd keep those grants in code next to the migrations.

Which databases we'd move first

Not every Postgres in an estate is a candidate. This is the order we'd take them in.

Database Our call Reason
Internal tool that reads warehouse numbers Move first The nightly copy goes away, and sign-in moves to Databricks identities
Customer-facing app that joins analytics at request time Move after a latency test Synced tables remove the copy, but the screen's latency has to be measured first
Product database that never touches analytics Leave it It gains branching and scale to zero, which rarely pays for a migration
Database in a region Lakebase doesn't serve Leave it Projects live in the workspace region (Manage projects)

The more often a database's rows end up in a report, the more a move saves.

One app and one gold table to start

We'd start with one application and one gold table the business already trusts. Sync it in Snapshot mode, join it to an app table, and measure the latency real users would see. Then try Triggered at 15 minutes, and Continuous only when somebody needs seconds.

Set the restore window on the first day, since it applies across the project, and put an expiration (ttl or expire_time) into every script that creates a branch, because expiration is set branch by branch and deletion is permanent. Put snapshot storage in the same budget review, since it's been billable since 1 June 2026 (release notes); rates are on the Lakebase pricing page. Moving an existing store over, as we did for TotalLoop, is a migration in its own right, and our Lakebase implementation work covers it. For a comparison with another vendor's Postgres, see Lakebase vs Snowflake Postgres.

Frequently asked questions

What does registering a Lakebase database in Unity Catalog do?

It makes the Postgres database a catalog that a SQL warehouse can query in place, reading live rows with no copy. At our user group session postgres create-catalog took 5.7 seconds, and from there Unity Catalog's permissions, lineage and audit logs cover the operational data too. Registration is read-only from the lakehouse side, so writes still go through Postgres.

Does Lakebase give an application a REST API over its tables?

Yes, the Lakebase Data API serves REST straight over Postgres, so there's no separate API service to build and host. It runs each request as the caller's identity, which makes GRANT and row-level security the whole authorization model. When we built against it live, filters and ordering were query parameters, foreign keys came back as embedded objects, and responses ran 384 to 542 ms.

How slow is the first query after Lakebase scales to zero?

On the project we measured, the first query against an idle endpoint took 2,979 ms against 1,650 ms warm, so about 1.3 seconds was the endpoint waking up. That's a fair price for an internal tool and a real one for a customer-facing screen. We'd keep a minimum compute on anything a customer waits on and let the rest scale to zero.

Does Postgres row-level security work for Databricks identities?

It does, because each Databricks identity arrives as a Postgres role and the policy reads that role. We tested one row-level security policy on an orders table against three callers and got three answers. The owner saw every status, the service principal got an empty result for rows it couldn't read, and a write of a row the policy would hide came back 403 with error 42501.