Content
@
0 reply
0 recast
0 reaction
Shane da Silva
@sds
Great post on how PG lock behavior during schema changes. It's surprising (but obvious in hindsight) how a statement that obtains a lock which doesn't conflict with a schema change could still be blocked by another statement that does obtain a blocking lock, due to the FIFO nature of the lock queue. https://xata.io/blog/migrations-and-exclusive-locks
1 reply
2 recasts
24 reactions
Cassie Heart
@cassie
curious whether postgres perf on things like this would improve if they used a priority queue instead of a simple fifo queue
1 reply
0 recast
3 reactions
Shane da Silva
@sds
My knowledge of distributed systems locking theory is way out of practice, but feels like it might make it harder to detect deadlocks (or perhaps increase the chance of livelocks) if you allow lock requests to “jump the queue”? That said, someone has probably come up with something clever to mitigate.
0 reply
0 recast
1 reaction