Skip navigation
Postgres 19 introduces smarter read replicas ๐Ÿ˜๐Ÿš€
0:00 / 0:16

Postgres 19 introduces smarter read replicas ๐Ÿ˜๐Ÿš€

alex shapalov

@alxshp4.1K followers

Visit on X

15,352 views

Postgres 19 introduces smarter read replicas ๐Ÿ˜๐Ÿš€ You hit Save. โœ… You refresh. ๐Ÿ”„ Your old data is back. ๐Ÿ‘€ Your write committed. Your replica was still catching up. โœ๏ธ Write to the primary. โœ… Commit the transaction. ๐Ÿ“ Capture the primaryโ€™s WAL position after the commit. โณ Run WAIT FOR LSN on the replica with that position. ๐Ÿ”Ž Once the wait succeeds, read from that same replica. With the new WAIT FOR LSN command, your app can tell an async replica how far to catch up before running the read. Read your own writes on an async replica. ๐Ÿ˜

Comments

Comments from the original post on X (Twitter)

No comments yet