Skip to content

Tag: deadlock

waitlist in postgres, deadlock

I’m trying to create a waiting list in Postgres. Minimal code: status is important, because I want to be able to notify users when they are applied after waitlisted. But don’t want to notify them based on that they are in the first n position if they wasn’t waitlisted at all. Services are li…

MariaDb InnoDB deadlock while doing many inserts

I’m having deadlock issues with a MariaDB (10.0.27)if it’s under pressure. The database schema is basically a hierarchy and the leaf node causes this: This is how my leaf table looks like: I’m able to reproduce the deadlock with an input set that puts the system under pressure. With this, I&…

What determines the locking order for a multi-table query?

Does the SQL standard specify the locking order for a multi-table query? For example, given: Does the SQL standard guarantee a locking order or is it determined by the (implementation-specific) execution plan? Is there a way to guarantee a locking order? If there is no way to guarantee locking order, how are …