FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
The ALTER TABLE that took down our API for 6 minutes
How-ToDevOps

The ALTER TABLE that took down our API for 6 minutes

via Dev.toMunteanu Flavius-Ioan1mo ago

Last Tuesday at 2:47 PM, we deployed a migration that looked completely innocent: ALTER TABLE users ADD COLUMN email_verified boolean NOT NULL ; CREATE INDEX idx_users_email ON users ( email ); Two statements. Nothing exotic. The kind of thing you've written a hundred times. At 2:48 PM, every API endpoint that touched the users table started timing out. Our health checks went red. PagerDuty fired. Customers couldn't log in. At 2:54 PM — six minutes later — the migration finished and everything recovered on its own. The root cause wasn't a bug. It was a lock. What actually happened Every DDL statement in Postgres acquires a lock on the table it modifies. The lock type depends on the statement: Statement Lock Mode What it blocks ADD COLUMN ... NOT NULL (no DEFAULT) ACCESS EXCLUSIVE Everything — reads, writes, DDL CREATE INDEX (no CONCURRENTLY) SHARE All writes SELECT ACCESS SHARE Nothing ACCESS EXCLUSIVE is the nuclear option. It blocks every other operation on the table — including simp

Continue reading on Dev.to

Opens in a new tab

Read Full Article
20 views

Related Articles

How-To

The most important 40 mcq with its answers How to use Android visual studio to make a mobile app

Medium Programming • 12h ago

What is Agent Script? How to Build Agents with It in Agentforce
How-To

What is Agent Script? How to Build Agents with It in Agentforce

Medium Programming • 12h ago

I Coded 3 Famous Trading Strategies in Pine Script and Backtested All of Them. None Passed.
How-To

I Coded 3 Famous Trading Strategies in Pine Script and Backtested All of Them. None Passed.

Medium Programming • 12h ago

Belkin’s battery-equipped Switch 2 case is more than 35 percent off right now
How-To

Belkin’s battery-equipped Switch 2 case is more than 35 percent off right now

The Verge • 13h ago

Why this Marshall is the first soundbar I've tested that truly challenges my Sonos Arc Ultra
How-To

Why this Marshall is the first soundbar I've tested that truly challenges my Sonos Arc Ultra

ZDNet • 14h ago

Discover More Articles