Postgres FM cover image

Wait events

Postgres FM

00:00

How to Optimize Posgus for Lightweight Locks

If you see lock weight event type i your and you can understand reading or writing you already understand that you need to pay attention to your disk subsystem. To get rid of long lock waiting for example very good trick is to use select for update either skip locked or no weight so either you fail if in case of collision on some lock acquisition  or you just skip those roles as well. Get next available not yet locked this is good for polarization of some batch processing for example. If you see lightweight lock this is sometimes maybe the trickiest part there are several lightweight locks it's about memory work with memory buffer pool and so and sometimes you need to optimize posgus itselfSometimes we look back

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