TLDR Data · DEEP DIVES

READ YOUR OWN WRITES, OFF THE PRIMARY

boringsql.com10 min read

Summary from the TLDR Data newsletter

Modern apps can write successfully, invalidate cached state, and immediately read from a replica that has not replayed the change yet. PostgreSQL 19's WAIT FOR LSN lets applications route reads to replicas while waiting for a specific WAL position, turning read-your-writes consistency into a measured timeout budget instead of primary pinning or sleep hacks.