Urgent.News

What's breaking now, across thousands of outlets.

Tech

I Fixed a Pricing Disaster With a Database Branch

Branch-based restores on Lakebase, told through a retail database. Picture this. It is 1:47 AM on the Sunday before Thanksgiving week. Your team just pushed a pricing update to the Postgres database behind the e-commerce platform. By 2:15 AM the on-call engineer sees it: a bad join in the migration script overwrote regular prices with clearance prices across 40,000 SKUs. Every minute, orders keep…

On the Sunday before Thanksgiving, a pricing update to the e-commerce platform's Postgres database went wrong. By 2:15 AM, the on-call engineer noticed a bad join in the migration script that overwrote regular prices with clearance prices for 40,000 SKUs. The team faced two options: continue selling at wrong prices or take the storefront offline for a lengthy recovery process.

A third option emerged - branch-based restores on Databricks Lakebase, a feature launched on October 1. Instead of a traditional restore, a branch was opened at 1:46 AM, providing its own compute and connection string. The corrupted branch remained for forensic purposes, while the application was repointed, bringing the downtime down to minutes.

This works due to Lakebase's architecture, where compute is separated from storage, and compute ships write-ahead log records to a durable layer keeping full history. A restore request maps the timestamp to the corresponding log sequence number, creating a branch pointing at that moment, and attaching compute without copying data.

The original branch stays online, allowing for investigation and recovery. Branch restores can be used for routine operations, such as running old and new forecasts side by side, validating schema changes, and quickly undoing AI agent actions. The key takeaway is that databases are converging towards the semantics developers expect from version control systems like git, with cheap copies, instant reverts, and history that can be checked out.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Why Two’s Complement Conversion Needs More Than `parseInt`

When I first wrote a signed-binary converter, the obvious implementation was “call toString(2) and let JavaScript do the rest.” That works for positive integers, but it hides the two decisions a…

  • parseInt alone insufficient for signed-binary conversion
  • Converter determines valid range for given bit width
  • Padding crucial for correct sign bit interpretation

48-Hour Field Notes: I Parked the Prompt Until the Runtime Card Existed

I had a tiny Python job that passed in my editor and then died on a clean remote interpreter. My hands went straight back to the chat box, because the model had drafted the snippet and I wanted a new…

  • 48-hour investigation to resolve Python issue
  • Avoided sensitive details in remote interpreter
  • Recorded key information for cross-comparison

More from Saturday 10 October →