The Backend Engineering Show with Hussein Nasser cover image

All Postgres Locks Explained | A Deep Dive

The Backend Engineering Show with Hussein Nasser

00:00

The Concurrent Locking for No Key Update

This particular lock is acquired when you do a normal update. It will not block for select for key share, because I know that the thing I'm doing is not really updating keys. So this is very similar to for update, but it's weaker. This acquires a shared lock rather than an exclusive lock on the retrieve draw. A shared lock blocks other transaction from performing update delete select for No Key Update. You can't even do that, but it does not prevent select for share and select forkey share.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app