Databricks Lakebase Safekeeper, Pageserver, and LTAP Architecture

Agenda

  1. Purpose
  2. Important technical corrections
  3. Step 1: Create the Databricks Free Edition environment
  4. Step 2: Understand traditional PostgreSQL storage
  5. Step 3: Understand the Lakebase compute layer
  6. Step 4: Understand the Safekeeper write path
  7. Step 5: Understand the Pageserver storage path
  8. Step 6: Understand ingestion and layer creation
  9. Step 7: Understand GetPage at LSN reconstruction
  10. Step 8: Understand branch creation
  11. Step 9: Create a Lakebase project
  12. Step 10: Run a transactional write exercise
  13. Step 11: Verify rollback behavior
  14. Step 12: Create an instant development branch
  15. Step 13: Test a historical branch
  16. Step 14: Configure Lakebase Change Data Feed
  17. Step 15: Measure transactional-to-analytical freshness
  18. Step 16: Materialize analytical tables
  19. Step 17: Add Delta table optimization
  20. Step 18: Use Photon for analytical SQL
  21. Step 19: Build a point-in-time risk snapshot
  22. Step 20: Reconcile Lakebase and Delta results
  23. Step 21: Design front-office and back-office consumers
  24. Step 22: Add a market-liquidity calculation
  25. Step 23: Apply Unity Catalog governance
  26. Step 24: Monitor the storage architecture
  27. Step 25: Validate failure and recovery behavior
  28. Step 26: Use the architecture for institutional-grade workloads
  29. Step 27: Move from Free Edition to production
  30. Lessons learned
  31. Important failure modes
  32. References

Key Takeaway

This guide explains how Databricks Lakebase separates PostgreSQL compute from durable storage, how Safekeepers and Pageservers participate in write and read paths, how log sequence numbers support versioned page reconstruction and branching, and how Lakebase connects transactional data to lakehouse analytics.

Purpose

This guide explains how Da ➔ The implementation exercis

This guide explains how Databricks Lakebase separates PostgreSQL compute from durable storage, how Safekeepers and Pageservers participate in write and read paths, how log sequence numbers support versioned page reconstruction and branching, and how Lakebase connects transactional data to lakehouse analytics.

The implementation exercises use Databricks Free Edition as a perpetual, no-cost, serverless-only learning environment. Free Edition is appropriate for learning PostgreSQL behavior, Lakebase concepts, synthetic transaction workloads, branches, Unity Catalog tables, and analytical queries. It is not a production database service-level environment.

Important technical corrections

Lakebase does not simply w ➔ Safekeepers replicate and ➔ Pageservers ingest WAL, ma ➔ Lakebase LTAP can expose t ➔ Operational and analytical

Lakebase does not simply write PostgreSQL .tar data chunks to local compute disks. Its PostgreSQL compute layer is stateless with respect to durable database storage. Durable state is maintained by a distributed storage layer made up of Safekeepers, Pageservers, and cloud object storage.

Safekeepers replicate and persist PostgreSQL write-ahead log records before a transaction commit is acknowledged. Databricks documents quorum-based WAL replication across availability zones. The internal consensus and replication implementation should be described using the official term “quorum replication” unless a specific Databricks source explicitly identifies a Paxos or Raft implementation.

Pageservers ingest WAL, maintain versioned page history, reconstruct PostgreSQL pages at a requested log sequence number, and use cloud object storage as the durable storage foundation. Pageservers are not the same as an application-visible Delta Lake or Apache Iceberg table.

Lakebase LTAP can expose transactional changes to the lakehouse through managed capabilities such as Lakebase Change Data Feed. This is different from claiming that every PostgreSQL INSERT is synchronously converted into a Delta or Iceberg Parquet file before commit.

Operational and analytical workloads can use a unified storage and governance architecture, but “zero pipeline” does not mean zero processing, zero latency, or literal zero data movement. Managed services still capture changes, materialize analytical formats, track freshness, and handle schema evolution.

Absolute point-in-time synchronization between a front-office order book and a back-office risk calculation must not be assumed. Production systems require explicit snapshot identifiers, source commit positions, LSN watermarks, event-time controls, and measured freshness.

Step 1: Create the Databricks Free Edition environment

Create a Databricks Free E ➔ Use this project name: ➔ lakebase_storage_architect ➔ Create these workspace fol ➔ 00_environment

Create a Databricks Free Edition workspace.

Use this project name:

lakebase_storage_architecture_free_nonprod

Create these workspace folders:

  • 00_environment
  • 01_lakebase_postgres
  • 02_transaction_workload
  • 03_branching
  • 04_change_data_feed
  • 05_delta_analytics
  • 06_point_in_time_analysis
  • 07_monitoring
  • 08_governance

Create a notebook named 00_environment_check and run:

SELECT
  current_user() AS current_user,
  current_catalog() AS current_catalog,
  current_schema() AS current_schema,
  current_timestamp() AS checked_at;

Document these limitations:

  • Free Edition is for learning and prototyping.
  • Compute is serverless-only.
  • Fair-use quotas apply.
  • Lakebase availability and specific LTAP capabilities can vary by cloud, region, workspace, and release state.
  • No production order processing, risk enforcement, payment, or regulated books-and-records workflow should depend on the environment.
  • Use synthetic data only.

Step 2: Understand traditional PostgreSQL storage

Traditional PostgreSQL com ➔ Before acknowledging a com ➔ PostgreSQL also maintains ➔ The traditional architectu ➔ Lakebase retains PostgreSQ

Traditional PostgreSQL combines the query process, buffer cache, WAL handling, and database data files around one host or tightly attached storage system.

Before acknowledging a commit, PostgreSQL writes the transaction's WAL record to durable storage. WAL provides a sequential recovery record and allows PostgreSQL to recover modified pages after a failure.

PostgreSQL also maintains relation data files that materialize the current state of table and index pages. A normal PostgreSQL page is commonly 8 KB.

The traditional architecture is operationally simple, but compute and storage scaling are coupled. Creating a full branch, read replica, or point-in-time copy can require substantial copying, replay, or storage provisioning.

Lakebase retains PostgreSQL transaction semantics while separating the compute and durable storage responsibilities.

Step 3: Understand the Lakebase compute layer

The Lakebase compute node ➔ It performs familiar datab ➔ Parse and plan SQL. ➔ Execute transactions. ➔ Maintain session state.

The Lakebase compute node runs a PostgreSQL-compatible query engine.

It performs familiar database work:

  • Parse and plan SQL.
  • Execute transactions.
  • Maintain session state.
  • Maintain an in-memory shared buffer cache.
  • Generate WAL records for changes.
  • Use PostgreSQL indexes and constraints.
  • Return PostgreSQL protocol responses to applications.

The compute node is stateless with respect to authoritative durable database storage. It can cache pages in memory and maintain temporary local runtime state, but the durable database does not depend on one compute instance's local disk.

This separation enables:

  • Scale to zero.
  • Independent compute resizing.
  • Faster compute restart.
  • Read replicas sharing the same storage foundation.
  • Instant branches using copy-on-write metadata.
  • Failover without copying the full database to another compute node.

Stateless does not mean that a compute interruption is invisible to every application. Applications should use connection retry, idempotency, and transaction retry patterns appropriate to PostgreSQL.

Step 4: Understand the Safekeeper write path

When an application execut ➔ Instead of relying on one ➔ A Safekeeper is a speciali ➔ Lakebase acknowledges a co ➔ Use these LSN concepts:

When an application executes an INSERT, UPDATE, or DELETE, PostgreSQL changes pages in memory and emits WAL records describing the changes.

Instead of relying on one compute node's local WAL disk as the durable authority, the compute node streams WAL to multiple Safekeeper nodes.

A Safekeeper is a specialized WAL persistence service. It receives WAL, persists it, participates in replication, tracks LSN progress, and acknowledges durable receipt.

Lakebase acknowledges a committed transaction only after the required storage durability condition is satisfied. Databricks describes this as writing to multiple locations across availability zones and recording committed transactions durably before acknowledging them.

Use these LSN concepts:

  • insert_lsn: how far the compute WAL writer has generated WAL.
  • flush_lsn: how far WAL is known to be durably persisted for the relevant path.
  • commit_lsn: the WAL position associated with a committed transaction.
  • replay_lsn: how far a consumer or reconstructed state has applied WAL.

Exact exposed metric names can vary. Use the documented Lakebase monitoring interfaces rather than assuming all internal LSN values are available to clients.

Do not design an application around a fixed number of Safekeepers. Databricks manages the storage topology and redundancy.

Step 5: Understand the Pageserver storage path

Pageservers receive or ret ➔ The storage model is log s ➔ A page version is addresse ➔ A conceptual key can inclu ➔ Relation identity.

Pageservers receive or retrieve durable WAL and transform it into a page-version history suitable for scalable reads and long-term storage.

The storage model is log structured and non-overwriting. Historical versions are retained under the service's retention and branching model rather than updating one authoritative page file in place.

A page version is addressed by a database object and page identity together with an LSN.

A conceptual key can include:

  • Relation identity.
  • Fork number.
  • Block number.
  • Tenant or timeline identity.

A conceptual value can be:

  • A complete page image.
  • A WAL-derived delta that can be applied to an earlier image.
  • Metadata needed to reconstruct relation state.

The internal implementation is managed by Databricks. Users should not build direct dependencies on private layer-file formats, local index structures, or undocumented storage APIs.

Step 6: Understand ingestion and layer creation

Incoming page changes and ➔ When internal thresholds a ➔ A delta layer represents c ➔ An image layer contains co ➔ Compaction merges or reorg

Incoming page changes and WAL-derived records are first accumulated in memory and organized for persistent storage.

When internal thresholds are reached, the storage engine creates immutable layer files.

A delta layer represents changes over a defined key and LSN range.

An image layer contains complete page images at a particular historical boundary. Image layers reduce how many deltas must be replayed for a read.

Compaction merges or reorganizes historical layers so reads do not need to traverse an unbounded sequence of small deltas.

Layer files can be uploaded to managed cloud object storage such as Amazon S3, Azure Data Lake Storage, or Google Cloud Storage, depending on the Databricks cloud.

Cloud object storage is the durable foundation. Pageservers provide the indexed and cached serving layer used by compute.

The thresholds, compaction schedules, index structures, and file sizes are service internals. Do not hard-code an assumption such as “every 1 GB creates one layer” into an institutional design unless the current Databricks documentation provides that contract.

Step 7: Understand GetPage at LSN reconstruction

When a required page is no ➔ Conceptually, the request ➔ GetPage(page_key, requeste ➔ The Pageserver finds the n ➔ It then locates the releva

When a required page is not present in the compute node's buffer cache, the compute layer requests the page from storage for a specific LSN.

Conceptually, the request is:

GetPage(page_key, requested_lsn)

The Pageserver finds the newest image layer at or before the requested LSN.

It then locates the relevant delta records after the image LSN and no later than the requested LSN.

The Pageserver replays those changes in order and reconstructs a standard PostgreSQL page.

The reconstructed page is returned to the compute node and can be cached in the PostgreSQL buffer cache.

This model supports historical page versions and branch timelines without maintaining a full physical copy for every compute or branch.

Do not promise that every page reconstruction completes in a fixed number of milliseconds. Latency depends on cache state, layer lookup, delta depth, object-storage access, network conditions, page history, and service load.

Step 8: Understand branch creation

Lakebase branches use copy ➔ A new branch references an ➔ New writes create a separa ➔ This makes branches useful ➔ Application development.

Lakebase branches use copy-on-write storage metadata.

A new branch references an existing parent timeline at a selected point. The branch initially shares the parent's historical storage rather than copying every database page.

New writes create a separate branch history.

This makes branches useful for:

  • Application development.
  • Schema migration testing.
  • Reproducing an incident at an earlier database state.
  • Testing a new pricing or risk calculation.
  • Validating a data correction before applying it to a production branch.

A branch is not a Git repository. “Git-style branching” is an analogy for fast, isolated, copy-on-write histories. Database branches do not automatically provide text merges, semantic conflict resolution, or an unrestricted merge-to-production operation.

Step 9: Create a Lakebase project

Open the Databricks app sw ➔ If Lakebase is not availab ➔ Create a project named: ➔ storage-architecture-lab ➔ Create a database named:

Open the Databricks app switcher and select Lakebase Postgres.

If Lakebase is not available, continue with the conceptual and Delta exercises and repeat this step in a supported workspace.

Create a project named:

storage-architecture-lab

Create a database named:

institutional_ops

Open the Lakebase SQL editor.

Create an operational schema:

CREATE SCHEMA IF NOT EXISTS trading_ops;

Create a synthetic order table:

CREATE TABLE IF NOT EXISTS trading_ops.orders (
  order_id UUID PRIMARY KEY,
  strategy_id TEXT NOT NULL,
  instrument_id TEXT NOT NULL,
  side TEXT NOT NULL CHECK (side IN ('BUY', 'SELL')),
  quantity NUMERIC(24,8) NOT NULL CHECK (quantity > 0),
  limit_price NUMERIC(24,10),
  order_status TEXT NOT NULL,
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  synthetic_only BOOLEAN NOT NULL DEFAULT TRUE
);

Create a synthetic risk-decision table:

CREATE TABLE IF NOT EXISTS trading_ops.risk_decisions (
  decision_id UUID PRIMARY KEY,
  order_id UUID REFERENCES trading_ops.orders(order_id),
  decision TEXT NOT NULL,
  decision_reason TEXT NOT NULL,
  decided_by TEXT NOT NULL,
  decided_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  synthetic_only BOOLEAN NOT NULL DEFAULT TRUE
);

Step 10: Run a transactional write exercise

Begin a PostgreSQL transac ➔ Use the returned order ID ➔ The order, decision, and s ➔ The storage service's WAL

Begin a PostgreSQL transaction:

BEGIN;

INSERT INTO trading_ops.orders (
  order_id,
  strategy_id,
  instrument_id,
  side,
  quantity,
  limit_price,
  order_status
)
VALUES (
  gen_random_uuid(),
  'SIM_CREDIT_RELATIVE_VALUE',
  'SIM_BOND_ID_001',
  'BUY',
  1000000,
  98.7500000000,
  'PENDING_RISK'
)
RETURNING order_id;

Use the returned order ID to create a linked risk decision:

INSERT INTO trading_ops.risk_decisions (
  decision_id,
  order_id,
  decision,
  decision_reason,
  decided_by
)
VALUES (
  gen_random_uuid(),
  '<RETURNED_ORDER_ID>'::uuid,
  'APPROVED_FOR_SIMULATION',
  'Synthetic limit and liquidity checks passed',
  'synthetic-risk-engine'
);

UPDATE trading_ops.orders
SET order_status = 'APPROVED_FOR_SIMULATION',
    updated_at = NOW()
WHERE order_id = '<RETURNED_ORDER_ID>'::uuid;

COMMIT;

The order, decision, and status update commit atomically. Either all become durable or the transaction rolls back.

The storage service's WAL durability path is internal. The application receives normal PostgreSQL transaction semantics.

Step 11: Verify rollback behavior

Start another transaction: ➔ The check constraint shoul ➔ Run: ➔ Confirm that the valid qua ➔ This confirms application-

Start another transaction:

BEGIN;

UPDATE trading_ops.orders
SET quantity = -100
WHERE order_id = '<RETURNED_ORDER_ID>'::uuid;

The check constraint should reject the invalid value.

Run:

ROLLBACK;

Confirm that the valid quantity remains unchanged:

SELECT order_id, quantity, order_status
FROM trading_ops.orders
WHERE order_id = '<RETURNED_ORDER_ID>'::uuid;

This confirms application-visible ACID behavior. It does not expose the private Safekeeper or Pageserver internals.

Step 12: Create an instant development branch

In the Lakebase interface, ➔ risk-model-v2-test ➔ Create it from the current ➔ Connect to the new branch. ➔ Add a test column:

In the Lakebase interface, create a branch named:

risk-model-v2-test

Create it from the current production or main branch at the current point in time.

Connect to the new branch.

Add a test column:

ALTER TABLE trading_ops.risk_decisions
ADD COLUMN model_version TEXT;

Update only the branch:

UPDATE trading_ops.risk_decisions
SET model_version = 'risk-model-v2-test';

Verify that the parent branch does not contain this schema change.

This exercise demonstrates storage sharing and branch isolation. It does not require a full database copy before the branch becomes available.

Step 13: Test a historical branch

Choose a timestamp before ➔ Create a branch from that ➔ Query the order from the h ➔ Compare the result with th ➔ A historical branch repres

Choose a timestamp before the latest synthetic order update.

Create a branch from that historical point if the current workspace and retention allow it.

Query the order from the historical branch:

SELECT order_id, order_status, updated_at
FROM trading_ops.orders
WHERE order_id = '<RETURNED_ORDER_ID>'::uuid;

Compare the result with the current branch.

A historical branch represents the database state reachable from its selected timeline point. Its availability depends on the service's retention and restore capabilities.

Do not claim unlimited retention. Institutional retention requires an explicit policy, supported retention settings, backups or archival controls, and periodic restore tests.

Step 14: Configure Lakebase Change Data Feed

Use the Lakebase integrati ➔ trading_ops.orders ➔ trading_ops.risk_decisions ➔ Create Unity Catalog Delta ➔ lakebase_ltap_lab.raw.orde

Use the Lakebase integration interface to select these PostgreSQL tables:

  • trading_ops.orders
  • trading_ops.risk_decisions

Create Unity Catalog Delta destinations such as:

  • lakebase_ltap_lab.raw.orders_cdf
  • lakebase_ltap_lab.raw.risk_decisions_cdf

If the catalog does not exist, create it in Databricks SQL:

CREATE CATALOG IF NOT EXISTS lakebase_ltap_lab;
CREATE SCHEMA IF NOT EXISTS lakebase_ltap_lab.raw;
CREATE SCHEMA IF NOT EXISTS lakebase_ltap_lab.silver;
CREATE SCHEMA IF NOT EXISTS lakebase_ltap_lab.gold;

Preserve or derive these fields where the integration exposes them:

  • Source primary key.
  • Source operation type.
  • Source commit position or ordering metadata.
  • Source commit time.
  • Destination ingestion time.
  • Branch or database identity.

The integration materializes Lakebase changes into governed Delta tables. The exact availability, naming, and setup procedure depend on the Databricks cloud and current Lakebase release.

Step 15: Measure transactional-to-analytical freshness

Create a freshness view: ➔ Adjust the column names to ➔ Measure: ➔ Median lag. ➔ 95th percentile lag.

Create a freshness view:

CREATE OR REPLACE VIEW lakebase_ltap_lab.gold.integration_freshness AS
SELECT
  order_id,
  MAX(source_commit_time) AS latest_source_commit_time,
  MAX(ingested_at) AS latest_delta_ingestion_time,
  timestampdiff(
    MILLISECOND,
    MAX(source_commit_time),
    MAX(ingested_at)
  ) AS integration_lag_ms
FROM lakebase_ltap_lab.raw.orders_cdf
GROUP BY order_id;

Adjust the column names to match the actual generated integration table.

Measure:

  • Median lag.
  • 95th percentile lag.
  • 99th percentile lag.
  • Maximum lag.
  • Number of records outside the freshness target.

Do not describe the result as zero latency.

For a learning workflow, a target such as 30 seconds can be reasonable. For front-office risk or order control, use the dedicated production control system and define a much stricter, independently validated requirement.

Step 16: Materialize analytical tables

Create a current-order ana ➔ Replace source_commit_posi ➔ Create an audit history vi ➔ Use the current-state view

Create a current-order analytical view from committed change records.

CREATE OR REPLACE VIEW lakebase_ltap_lab.silver.current_orders AS
WITH ranked AS (
  SELECT
    *,
    ROW_NUMBER() OVER (
      PARTITION BY order_id
      ORDER BY source_commit_position DESC, ingested_at DESC
    ) AS row_number
  FROM lakebase_ltap_lab.raw.orders_cdf
  WHERE source_operation <> 'DELETE'
)
SELECT * EXCEPT (row_number)
FROM ranked
WHERE row_number = 1;

Replace source_commit_position and source_operation with the actual integration metadata.

Create an audit history view without collapsing versions:

CREATE OR REPLACE VIEW lakebase_ltap_lab.gold.order_history AS
SELECT
  order_id,
  strategy_id,
  instrument_id,
  side,
  quantity,
  limit_price,
  order_status,
  source_operation,
  source_commit_position,
  source_commit_time,
  ingested_at
FROM lakebase_ltap_lab.raw.orders_cdf;

Use the current-state view for present analysis and the history view for investigations.

Step 17: Add Delta table optimization

Create a managed analytica ➔ Run: ➔ Liquid Clustering improves ➔ Do not confuse a PostgreSQ

Create a managed analytical table clustered for the common investigation pattern:

CREATE TABLE IF NOT EXISTS lakebase_ltap_lab.gold.orders_analytical
CLUSTER BY (strategy_id, instrument_id, order_status)
AS
SELECT *
FROM lakebase_ltap_lab.silver.current_orders;

Run:

OPTIMIZE lakebase_ltap_lab.gold.orders_analytical;

Liquid Clustering improves file skipping for relevant filters. It is separate from Lakebase page storage, PostgreSQL indexes, Safekeepers, and Pageserver compaction.

Do not confuse a PostgreSQL B-tree index with a Delta Lake clustering layout. Each serves a different execution engine and workload.

Step 18: Use Photon for analytical SQL

Run a risk aggregation in ➔ Photon accelerates compati ➔ Photon does not directly e ➔ The supported path is Lake

Run a risk aggregation in a serverless Databricks SQL warehouse:

SELECT
  strategy_id,
  instrument_id,
  order_status,
  COUNT(*) AS order_count,
  SUM(quantity) AS total_quantity,
  SUM(quantity * COALESCE(limit_price, 0)) AS gross_limit_notional
FROM lakebase_ltap_lab.gold.orders_analytical
GROUP BY strategy_id, instrument_id, order_status
ORDER BY gross_limit_notional DESC;

Photon accelerates compatible Databricks SQL and Spark SQL workloads on columnar lakehouse data.

Photon does not directly execute PostgreSQL row transactions and does not read private Pageserver layer files as if they were ordinary Parquet tables.

The supported path is Lakebase transactional data made available through LTAP capabilities as governed analytical data.

Step 19: Build a point-in-time risk snapshot

Create a control table for ➔ Before a risk run, record ➔ Filter the analytical chan ➔ Calculate positions, limit ➔ Store the watermark with t

Create a control table for analytical watermarks:

CREATE TABLE IF NOT EXISTS lakebase_ltap_lab.gold.analysis_watermarks (
  analysis_id STRING,
  analysis_started_at TIMESTAMP,
  lakebase_source_position STRING,
  latest_source_commit_time TIMESTAMP,
  latest_delta_ingestion_time TIMESTAMP,
  analysis_status STRING
) USING DELTA;

Before a risk run, record the latest fully available source position or equivalent integration watermark.

Filter the analytical change history to records no later than that watermark.

Calculate positions, limits, or exposures from one consistent analytical cut.

Store the watermark with the result.

This allows a reviewer to answer:

  • Which source changes were included?
  • Which were not yet available?
  • What was the measured integration lag?
  • Can the result be reproduced?

This is more defensible than claiming absolute synchronization without evidence.

Step 20: Reconcile Lakebase and Delta results

Create a synthetic reconci ➔ From Lakebase, record the ➔ From Delta, calculate the ➔ Compare: ➔ Row count.

Create a synthetic reconciliation process.

From Lakebase, record the count and a deterministic checksum for a bounded committed dataset.

From Delta, calculate the corresponding values at the matching integration watermark.

Compare:

  • Row count.
  • Distinct primary-key count.
  • Insert count.
  • Update count.
  • Delete count.
  • Sum of quantity.
  • Sum of notional.
  • Maximum source commit position.

Flag:

  • Missing key.
  • Duplicate key.
  • Unexpected delete.
  • Out-of-order source position.
  • Schema mismatch.
  • Lag outside target.
  • Checksum mismatch.

Do not compare an unbounded live PostgreSQL table against a Delta table at a different point in time and label every difference an error.

Step 21: Design front-office and back-office consumers

A front-office trading app ➔ A desk-risk application ne ➔ A back-office application ➔ An AI application needs go ➔ All consumers can use Unit

A front-office trading application needs transactionally consistent order state, deterministic controls, and low-latency point operations. Use PostgreSQL transactions and the approved execution infrastructure.

A desk-risk application needs current position and limit data with an explicit freshness watermark. It can combine the operational change feed with market data and risk factors in Delta.

A back-office application needs complete lifecycle history, booking, allocation, settlement, and reconciliation evidence. It can use the immutable change history and independent sources.

An AI application needs governed access, data minimization, source citations, and model logging. It should not receive unrestricted order or customer details.

All consumers can use Unity Catalog governance for analytical assets. PostgreSQL permissions and Lakebase roles still require separate design for operational objects.

Step 22: Add a market-liquidity calculation

Create a synthetic market- ➔ Create a current depth sum ➔ Join current simulated ord ➔ Show both the order source

Create a synthetic market-liquidity table:

CREATE TABLE IF NOT EXISTS lakebase_ltap_lab.raw.market_depth (
  observation_time TIMESTAMP,
  instrument_id STRING,
  side STRING,
  price DECIMAL(24,10),
  quantity DECIMAL(24,8),
  level_number INT,
  is_synthetic BOOLEAN
) USING DELTA;

Create a current depth summary:

CREATE OR REPLACE VIEW lakebase_ltap_lab.gold.market_liquidity_summary AS
SELECT
  instrument_id,
  MAX(observation_time) AS latest_observation_time,
  SUM(CASE WHEN side = 'BID' THEN quantity ELSE 0 END) AS bid_depth,
  SUM(CASE WHEN side = 'ASK' THEN quantity ELSE 0 END) AS ask_depth,
  (
    SUM(CASE WHEN side = 'BID' THEN quantity ELSE 0 END)
    - SUM(CASE WHEN side = 'ASK' THEN quantity ELSE 0 END)
  ) / NULLIF(SUM(quantity), 0) AS depth_imbalance
FROM lakebase_ltap_lab.raw.market_depth
GROUP BY instrument_id;

Join current simulated orders with liquidity:

SELECT
  o.order_id,
  o.strategy_id,
  o.instrument_id,
  o.side,
  o.quantity,
  l.bid_depth,
  l.ask_depth,
  l.depth_imbalance,
  l.latest_observation_time
FROM lakebase_ltap_lab.silver.current_orders o
LEFT JOIN lakebase_ltap_lab.gold.market_liquidity_summary l
  ON o.instrument_id = l.instrument_id;

Show both the order source watermark and the market-data observation time. A synchronized database architecture does not make two external sources share the same event time.

Step 23: Apply Unity Catalog governance

Create groups: ➔ lakebase_application_devel ➔ ltap_data_engineers ➔ front_office_analysts ➔ middle_office_risk

Create groups:

  • lakebase_application_developers
  • ltap_data_engineers
  • front_office_analysts
  • middle_office_risk
  • back_office_operations
  • independent_audit

Grant analysts access to curated views rather than raw change records unless they need the full event history.

Grant data engineers permissions to manage integration tables but not to approve trading actions.

Grant auditors read-only access to change history, analysis watermarks, lineage, and reconciliation results.

Use service principals for Lakebase integrations and scheduled analytical jobs.

Do not place PostgreSQL passwords, application tokens, or cloud credentials in notebooks.

Apply row filters and column masks to sensitive analytical data where supported.

Step 24: Monitor the storage architecture

Monitor Lakebase compute s ➔ Monitor the analytical pat ➔ Create operational indicat ➔ Lakebase connection error ➔ Transaction retry count.

Monitor Lakebase compute status, connection pressure, transaction errors, query latency, branch usage, storage consumption, and integration status.

Monitor the analytical path for source freshness, ingestion lag, schema drift, failed materialization, small-file growth, and query performance.

Create operational indicators:

  • Lakebase connection error rate.
  • Transaction retry count.
  • Long-running transaction count.
  • Integration median and p99 lag.
  • Delta table last update time.
  • Reconciliation mismatch count.
  • Branch age and owner.
  • Unused branch storage.
  • Failed analytical job count.

Internal Safekeeper and Pageserver metrics may not all be customer exposed. Use supported Databricks monitoring surfaces and support procedures.

Step 25: Validate failure and recovery behavior

Create a synthetic transac ➔ Restart or allow the compu ➔ Reconnect and verify that ➔ Create a second transactio ➔ Create a branch and verify

Create a synthetic transaction and commit it.

Restart or allow the compute endpoint to suspend where the service permits.

Reconnect and verify that the committed record remains available.

Create a second transaction and roll it back. Verify that the rolled-back record is absent.

Create a branch and verify that the parent and child diverge after a child write.

Generate a Lakebase update and measure when it becomes available in Delta.

Run reconciliation at a matched watermark.

Record observed recovery and integration times. Do not convert a single test into a universal SLA.

Step 26: Use the architecture for institutional-grade workloads

Use Lakebase for customer- ➔ Use Delta or Iceberg for l ➔ Use Photon through Databri ➔ Use Lakehouse//RT where av ➔ Use Lakebase Change Data F

Use Lakebase for customer-facing or operational applications that need PostgreSQL compatibility, constraints, transactions, point reads, writes, and branches.

Use Delta or Iceberg for large historical datasets, market data, risk factors, feature engineering, surveillance histories, and large aggregations.

Use Photon through Databricks SQL for compatible analytical workloads.

Use Lakehouse//RT where available for low-latency, high-concurrency analytical serving over governed lakehouse tables.

Use Lakebase Change Data Feed to expose selected operational changes to Delta without operating a separate external CDC stack.

Define one authoritative owner for each field. Avoid independent writes to the same business field in both PostgreSQL and Delta.

Define consistency requirements by use case:

  • Transactional application: PostgreSQL transaction consistency.
  • Operational dashboard: bounded freshness.
  • Risk report: reproducible watermark.
  • Back-office reconciliation: independently confirmed completeness.
  • Regulatory record: approved retention and immutable evidence.

Step 27: Move from Free Edition to production

Create separate developmen ➔ Configure identity federat ➔ Configure high availabilit ➔ Configure regional disaste ➔ Define data-retention requ

Create separate development, test, performance, disaster-recovery, and production environments.

Configure identity federation, private connectivity, network controls, secret management, audit delivery, service principals, and least-privilege PostgreSQL roles.

Configure high availability at the compute layer according to the required recovery-time objective.

Configure regional disaster recovery according to the jurisdiction and business-continuity plan.

Define data-retention requirements for branches, WAL-derived history, Delta history, analytical snapshots, and regulated records.

Load-test PostgreSQL transactions, page-cache miss behavior, connection pooling, branch creation, integration freshness, Photon analysis, reconciliation, and application concurrency.

Test compute failure, integration delay, schema change, duplicate delivery, out-of-order updates, branch misuse, stale analytical data, and unavailable market data.

Retain independent order, execution, broker, clearing, settlement, and ledger records where required. A unified architecture does not remove independent reconciliation obligations.

Lessons learned

Lakebase separates Postgre ➔ Safekeepers are responsibl ➔ Image layers reduce recons ➔ Branches share historical ➔ LTAP removes much of the f

Lakebase separates PostgreSQL compute from durable storage. Compute remains familiar to PostgreSQL applications, while Safekeepers, Pageservers, and cloud object storage maintain durable and versioned state.

Safekeepers are responsible for durable WAL replication. Pageservers organize page history and reconstruct pages at requested LSNs.

Image layers reduce reconstruction work by providing page snapshots. Delta layers preserve changes between snapshots. Compaction controls layer depth and storage efficiency.

Branches share historical storage and diverge through copy-on-write. They are useful for development, incident reproduction, and model testing, but they are not full Git repositories.

LTAP removes much of the fragile external integration stack between an operational PostgreSQL system and analytics. It does not justify claims of literal zero processing, zero latency, or automatic synchronous Parquet conversion on every PostgreSQL commit.

Institutional systems should record source commit positions, integration watermarks, market timestamps, and analytical cutoffs. That is how front-office and back-office users understand whether two results represent the same point in time.

Important failure modes

A consensus-label failure ➔ A local-NVMe assumption oc ➔ A direct-Parquet assumptio ➔ A private-format dependenc ➔ An unlimited-time-travel a

A consensus-label failure occurs when an undocumented Paxos or Raft implementation is presented as a product guarantee. Use the documented concept of quorum-based replication unless Databricks specifies the protocol.

A local-NVMe assumption occurs when a design depends on Safekeeper local hardware details that are not part of the customer contract.

A direct-Parquet assumption occurs when applications expect every PostgreSQL commit to synchronously produce Delta or Iceberg files. Use the supported LTAP integration and measure its freshness.

A private-format dependency occurs when applications depend on internal layer files, key encodings, or Pageserver indexes. Use supported PostgreSQL, Lakebase, Unity Catalog, and Delta interfaces.

An unlimited-time-travel assumption occurs when historical data is expected forever. Configure and test retention and archival.

An absolute-synchronization assumption occurs when operational data, market data, and risk results are described as perfectly simultaneous. Record and compare watermarks and timestamps.

A branch-is-backup assumption occurs when branches replace backup, archival, and disaster recovery. They serve different purposes.

A Free Edition assumption occurs when a learning environment is treated as a production transactional platform. Move to a supported paid environment before processing real institutional data.

References

Databricks Free Edition ➔ Lakebase architecture ➔ Lakebase storage architect ➔ LTAP architecture