Get the latest tech news

Postgres Schema Changes and Locking


Learn how schema changes can cause downtime by locking out reads and writes and how migration tools can avoid it by using lock timeouts, along with backoff and retry strategies.

Migrations that lock a database object for an unacceptable amount of time, causing the application to become unavailable as reads and writes start to fail. Today we're going to talk about the second type of breakage: how long running queries together with DDL statements can lock out reads and writes from a table, causing application downtime. However you make schema changes to your Postgres database, it's important to consider how long running queries together with DDL statements can block reads and writes to a table.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of queue

queue

Photo of Postgres

Postgres

Photo of Schema

Schema

Related news:

News photo

Overcoming pitfalls of Postgres logical decoding

News photo

Postgres 17: Streaming I/O for sequential scans and ANALYZE

News photo

Pg_lakehouse: A DuckDB Alternative in Postgres