Loading…
Topic
Lakebase
61 posts about Lakebase. Every summary links to the original.
- 61 posts
- 1 company
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Posts
Announcing General Availability of native Lakebase Postgres sink for Spark Structured Streaming
Databricks announced general availability of a native Lakebase sink for Apache Spark Structured Streaming, a connector that writes computed results directly to Lakebase Postgres, its fully managed serverless PostgreSQL database. The sink handles batching, retries, connection pooling, deduplication, and upserts automatically, and supports declarative merge strategies for non-key columns, eliminating custom foreach writers. It supports both micro-batch and Real-Time Mode, and works with tables registered in Unity Catalog or external PostgreSQL databases via a connection. In a benchmark with 20K events per second and 5 million active users, the sink achieved P50 latency of 183 ms and P99 latency of 354 ms, with Lakebase averaging 0.015 ms per upsert over 63.5 million upserts. The sink is built for low-latency use cases like fraud detection, live personalization, and real-time feature computation, as demonstrated in a video recommendation feature pipeline.
PostgreSQL 19 is available on Lakebase
PostgreSQL 19 reached GA and is available on Lakebase the same day, with contributions from Lakebase engineers who are PostgreSQL committers. The release targets operational problems such as table bloat, unstable query plans, and incomplete statistics. REPACK allows concurrent table rebuilding without blocking normal reads and writes during most of the operation, using logical decoding to capture ongoing changes. New query plan advice functions, pg_plan_advice and pg_stash_advice, let administrators intervene when the optimizer produces poor plans without modifying application query text. Logical replication gains online activation of logical decoding, sequence synchronization, and the ability to exclude specific tables from a publication.
Branch, sync, serve: What our Lakebase Hackathon taught us about building on Lakebase
Databricks ran a customer hackathon centered on Lakebase, a fully managed Postgres database that separates storage from compute and lives under Unity Catalog governance. The hackathon had two tracks: one focused on building applications using Lakebase’s Git-like database branching with copy-on-write storage, and the other on syncing Unity Catalog tables into Postgres and streaming changes back to Delta. Lyft built Jevons Search, which gives an AI agent a copy-on-write branch of production in about six seconds to test actions against business rules before applying them. CIBC built Branchflight, a platform that creates a zero-copy Lakebase branch for every pull request in under five seconds and deploys a preview environment. Several teams replaced separate systems like search indexes or staging databases with Lakebase features such as synced tables and online feature stores.
Dispelling LTAP myths
LTAP keeps one durable copy of each table in the lake, with heap pages and indexes as caches in front of it, not a second database. CDC creates a second database with its own catalog and timeline that can drift; LTAP has no second table to keep in step. Two lossless encodings of the same rows serve different access paths: heap pages for point lookups and Parquet for scans, with values Parquet cannot represent losslessly traveling in an overflow field. Every analytical query reads a consistent snapshot by asking Postgres for the current LSN, reading materialized data from object storage up to that LSN, and merging remaining pages from the pageserver. Logical replication reads every change from the WAL and carries state via replication slots, while LTAP parallelizes pages, not log records, and commits one Iceberg snapshot of current pages.
Lakebase Postgres is now generally available on Google Cloud
Lakebase Postgres is now generally available on Google Cloud, giving Databricks users a fully managed, serverless Postgres option for production and agentic workloads. Its architecture separates compute from storage and shares the same storage layer as analytical data, which removes pipeline maintenance and data duplication. The service offers serverless autoscaling with scale to zero, instant zero-copy branching, point-in-time recovery, standard Postgres tooling, pgvector-compatible search, and governance through Unity Catalog. On Google Cloud it provides multi-zone high availability with automatic failover and a 99.99% SLA, single-zone endpoints with a 99.9% SLA, beta private connectivity through Private Service Connect, and Databricks OAuth or native Postgres credentials. Lakebase Search is described as delivering twice the throughput of pgvector at four times lower cost, while direct writes can load 1TB in under five minutes; GA regions include asia-southeast1, europe-west3, us-central1, us-east4, and us-west1.
Lakebase branching for CI/CD: lessons from 100 PR databases
Snorkel AI needed each pull request in its CI pipeline to have an isolated copy of production data for realistic testing, but restoring a full database copy took about 20 minutes per environment. They adopted Databricks’ Lakebase Postgres, whose copy-on-write branching creates writable branches in seconds regardless of database size because no data is copied at branch creation. AWS DMS continuously replicates the production Aurora cluster into Lakebase’s main branch, keeping it within about two minutes of the source. For every PR, the CI pipeline creates a branch via API, runs tests, and either deletes the branch or relies on automatic TTL expiration to clean up. Provisioning time dropped from over 30 minutes to under 60 seconds at p95, supporting about 100 concurrent PR branches on a 2.5 TB dataset with storage growing only for changes written.
Real-time energy trading and analytics on Databricks
Energy trading desks face increasing price volatility and the EU’s move from hourly to 15-minute market intervals, multiplying market periods by four. Separating operational and analytical systems creates two versions of truth, stale risk controls, duplicated governance, and extra synchronization. Databricks addresses this with a unified platform: Spark Structured Streaming Real-Time Mode streams market data with millisecond latency into Lakebase, a serverless Postgres serving as the operational database. The same governed data supports real-time trading apps in Databricks Apps, machine learning models for price forecasts, and historical analysis via Genie One, all under Unity Catalog governance. This eliminates separate data copies and synchronization pipelines, enabling risk monitoring and analytics to work from a single consistent data foundation.
Introducing Agent Memory on Databricks
Databricks announces Agent Memory on its Agent Bricks platform, now in Beta. Agent Memory improves agent quality by storing critical facts, preferences, and workflows that agents should remember, reducing both cost and latency. It is built on the MemCurrent architecture from Databricks Research, which combines context logging plugins, on-demand tool access, and a background dreaming pipeline to consolidate memories, avoiding the cost of replaying full histories or building bespoke memory systems, all served on Lakebase for low latency. In internal benchmarks, agents with memory tripled pass rates on real enterprise tasks while using 31% fewer tokens compared to stateless agents. Agent Memory joins other Agent Bricks capabilities including hosting, Sandbox, Unity Gateway, pre-built MCP servers, and tracing and evaluation, providing a complete platform for building production agents at scale.
Sizing Lakebase Search: lessons from a real app and 4 million passages
Slide Hub, an internal Databricks app for slide search, uses Lakebase Postgres with Lakebase Search extensions (lakebase_vector and lakebase_text) to run hybrid vector and BM25 search on the same database as application data. The app stores 23k slides and indexes up to 4M passages from the MIRACL English corpus. Benchmarking shows that below 8 Compute Units (CU), Lakebase Postgres is the bottleneck; above 8 CU, the app’s worker count limits throughput. Candidate pool size significantly affects cold-start latency: 200 candidates preserves 90.5% of top-10 results while touching a third of the pages of 1,000 candidates. A 14-minute load test cost 0.13, with Lakebase compute billing only while active. For production, a 0.5 CU minimum costs ~ 31-40/month and avoids cold-start delays.
Real-Time Retail Intelligence: Building E-Commerce Recommendations with Lakebase and AI Search on Databricks
The post presents a reference architecture for building a production-grade e-commerce recommendation system on Databricks, based on a real-world implementation for a leading fashion e-commerce platform in Asia serving over 1 million monthly active users across 100,000+ SKUs. The system ingests approximately 1,000 events per second via Lakeflow Connect’s Zerobus into Unity Catalog Delta tables within a medallion architecture. Serving uses two paths: Path A for pre-computed batch recommendations via key-value lookup from Lakebase online tables, and Path B for real-time session-aware scoring using AI Search and a LightGBM model in a 3-stage funnel. The architecture unifies ingestion, feature management, model training, vector retrieval, and serving on a single governed platform, with cold-start handling for new users and products. Expected outcomes include low 2-digit millisecond responses, daily-fresh recommendations, and unified governance via Unity Catalog.
A practical guide to cost optimization with Lakebase Postgres
Lakebase uses separated storage and compute to reduce costs: branches share storage, autoscaling matches compute to demand, and scale to zero suspends compute after inactivity. Read replicas and high availability add compute without duplicating storage. For synced tables from Lakehouse, sync only the active working set via materialized views and choose the appropriate sync mode—snapshot for volatile data, triggered for incremental, continuous for real-time—and binpack tables into one pipeline to share compute. Right-size initial compute by focusing on the working set, and set PITR retention and snapshot schedules based on actual recovery needs. Snapshot storage is priced at $0.090/GB-month and PITR storage at $0.200/GB-month, both cheaper than regular branch storage. Compute and storage usage can be tracked through system.billing.usage, with separate SKUs for compute, branch storage, PITR, and snapshots.
Zero downtime patching lakebase part-1 prewarming
Lakebase addresses the workload disruption caused by planned PostgreSQL maintenance, where a restart clears in-memory buffer and local file caches. Although the database can return in about one second at P99, the source reports a roughly 70% pgbench TPS reduction while caches warm, potentially causing timeouts. Lakebase uses stateless Postgres compute replicas and disaggregated shared storage to prewarm a replacement compute before a scheduled restart. The control plane transfers cached-page information, loads pages from shared storage, and follows relevant WAL from Safekeepers, while the current primary continues serving traffic. After prewarming, Lakebase promotes the new compute with PostgreSQL’s pg_promote without restarting the server; tests on 10 GB pgbench workloads found nearly instant throughput recovery, especially for read-only queries.
Database Branching in Postgres: Git
Shared staging databases often drift as schemas diverge, test data accumulates, and developers avoid creating isolated environments because traditional pg_dump copies are slow and expensive. Databricks Lakebase Postgres addresses this with database branching, which creates fully isolated environments from a parent’s exact schema and data at a point in time. Branches use copy-on-write: they share underlying versioned storage until a branch changes, then record only new data, while each branch has independent compute and a separate connection string. Idle branches scale compute to zero, and storage cost tracks changes rather than the full database size. This supports per-developer, per-pull-request, per-test-run, and recovery workflows, including point-in-time branching within the restore window, with the source describing branch creation through the console, CLI, or API in under a minute.
Managed Postgres: What Lakebase Actually Takes Off Your Plate
Managed Postgres varies from OS patching alone to operating scaling, failover, backups, recovery, and related database tooling. Lakebase Postgres applies this model to serverless infrastructure, offering automatic scaling, scale-to-zero, PostgreSQL compatibility, automatic snapshots, point-in-time recovery, branching, built-in PgBouncer, and support for extensions including pgvector and PostGIS. Within a region, patching, scaling, failover, and backups run automatically, while encryption, access control, audit visibility, connection pooling, and lakehouse integrations are also addressed. The discussion also stresses checking PostgreSQL versions, configuration, extensions, and migration methods before moving an existing database. Cross-region disaster recovery remains the main exception: it is in Private Preview for AWS, with periodic replication, manual failover, and customer-managed recovery procedures.
Introducing Consort: Test-driven development on a branching database
Consort is introduced as an open-source agentic development framework for test-driven development on branching Lakebase Postgres databases. It addresses the limitations of mocks, shared staging databases, and risky schema-change ceremonies by bringing integration testing into the inner loop. Its build lane runs red/green/refactor cycles against isolated copy-on-write branches of real data, while versioned migrations keep code and schema changes together and pull-request checks test migrations against fresh branches. Consort organizes work through role-based agents and a deterministic conductor, preserving feature artifacts in dedicated directories and supplying scoped context packages. A VS Code plugin pairs Git and Lakebase branches, while an observability dashboard exposes agent turns and human approval gates; the project is community-supported rather than a bundled platform feature with an SLA.
Build durable agents with Temporal and Lakebase
Long-running personal-loan underwriting agents must preserve completed work, resume after worker failures, tolerate repeated tool calls, wait for reviewers, expose operational state, and retain an audit trail. The reference implementation combines Temporal durable Workflows and Activities with Lakebase Postgres, using Temporal Event History for replay and Lakebase schemas for run status, evidence, review state, messages, and metrics. Deterministic identifiers, constraints, guarded updates, and Postgres upserts make repeated Activity attempts target the same logical records, while Signals carry human decisions and long waits do not occupy workers. A Unity Catalog synced table supplies governed underwriting policy, and optional Change Data Feed publishes operational changes to Delta history tables. The implementation includes a React/FastAPI interface, mocked deterministic providers, OAuth credential refresh, and 21 passing tests, but does not validate production lending, compliance, security, scale, or an observed end-to-end feed.
Simplify AI agent orchestration with Lakebase Postgres
CLA and Databricks built a production document-processing application for auditing that reduces extraction time from hours to minutes without compromising quality, using Databricks-native services including Lakebase Postgres, Databricks Apps, Lakeflow Jobs, MLflow, and Unity Catalog Volumes. Lakebase serves as the orchestration layer’s single source of truth for tasks and execution attempts, coordinating long-running work, retries, leases, priorities, rate limits, costs, and status visibility. The queue uses Postgres patterns including FOR UPDATE SKIP LOCKED, priority and FIFO ordering, expiring leases for crash recovery, and database-backed concurrency controls. Databricks Jobs process PDFs through intelligent document processing and vision/LLM calls, while MLflow Tracing records execution and cost details and dashboard updates combine fast Postgres data with slower billing queries. In production, this architecture avoids external brokers and schedulers while providing durable task management, real-time visibility, and per-task cost attribution.
Branching databases like code: a CI/CD pattern for Lakebase, in production at Glaspoort
Glaspoort replaced a sprawl of outdated, one-off BI reports with a custom application that combines Databricks analytical tools with Lakebase, a serverless Postgres OLTP database. The application keeps curated lakehouse data in a read-only schema while application state occupies a separate schema, and supports development, acceptance, and production environments. Its CI/CD pattern treats database branches like code: long-lived environments branch directly from production, each pull request receives an ephemeral production-shaped branch, migrations are replayed, and a staging app image runs the full test suite against it. This topology makes periodic resets cheap, avoids deleting dependent branches, and preserves fresh test data; the team chose stacked promotion for velocity, retaining a separate crisis pipeline for urgent fixes.
Tech builds on AI. Finance protects the margin.
AI-native tech companies must protect unit economics as agents accelerate changes in compute consumption, pricing, and revenue recognition, while gross margins remain below classic software levels. Finance teams built around extracts, spreadsheets, and monthly reconciliation can miss repricing changes, metering errors, and compute-commitment risk. The proposed foundation is an evolving ontology that keeps product, plan, usage, and cost meanings current, with Stripe data entering Unity Catalog through OpenSharing and Lakebase providing transactional Postgres on the lakehouse. Genie One uses that ontology to answer governed, sourced questions about gross margin, consumption revenue at risk, and compute spend, while people retain decision authority. The post describes organizations using Databricks to consolidate reporting, forecasting, workflows, and finance applications, positioning a shared data-and-AI platform as the path from an initial answer to an ongoing finance platform.
Building a soccer coaching app on Databricks
Coach’s Corner, also called La Pizarra, turns high-frequency soccer tracking data into a bench-side application for replay, tactical analysis, scouting, standings, and agent-generated dossiers. Built as a Databricks App, it ingests NDJSON feeds at 25 frames per second through Auto Loader and Spark Declarative Pipelines, enforcing 46 data-quality expectations across bronze, silver, and gold layers. Liquid clustering supports 1–3-second DBSQL queries, while Lakebase synchronizes gold data to Postgres for millisecond replay reads and separates sequential playback from exploratory analytics. The scouting layer grounds Genie, Vector Search, a Unity Catalog-registered xG model, and an Agent Bricks supervisor in governed data, with Claude calls routed through the Unity AI Gateway, MLflow tracing, and a deterministic fallback. Together, these components are presented as a way to deliver traceable insights within seconds without forcing coaches to interpret raw tables or analysts to relay every result.
Related topics
All topics →Weekly digest
The best engineering reads, once a week.