Skip to content
Advertisement

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 limited to a given number of users.

PostgreSQL: deadlock without a transaction

I have a route (in a node JS app) that inserts and updates some data in a PostgreSQL database (version 13). In pseudo-code, here are all queries that are done in sequential order: On some instances of the app without that much traffic that writes on their own table, I have many deadlocks. I don’t understand why since there is

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’ve been playing around and once I remove the unique

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 we supposed to prevent deadlocks? UPDATE: Please do

Advertisement