Re: Deadlock with 2 processes waiting on transactionids and locking unrelated tables

2018-02-19 Thread Rene Romero Benavides
My guess is that the transaction doing: update "planscheduleitem" set "planschedule"=$1 where "psi"=$2 updates ticket before reaching that point And update ticket set unread = true where ticketid = $1 updates planscheduleitem before that Does it make sense to you? Btw, do the transactions

Re: Deadlock with 2 processes waiting on transactionids and locking unrelated tables

2018-02-19 Thread David Wheeler
Thanks for your response > Does any of the two tables have triggers? Yes the ticket table has a trigger that inserts changes into a ticketstatuslog table when the ticket.status column changes and on insert. ticket_status_insert_trigger AFTER INSERT ON ticket FOR EACH ROW EXECUTE PROCEDURE

Re: Deadlock with 2 processes waiting on transactionids and locking unrelated tables

2018-02-18 Thread Rene Romero Benavides
Hi. Does any of the two tables have triggers? What's the database / transaction isolation level? Do the updates run in a transaction among other read / write operations within the same transaction ? Regards. 2018-02-18 23:28 GMT-06:00 David Wheeler : > Hi, > > We’re seeing

Deadlock with 2 processes waiting on transactionids and locking unrelated tables

2018-02-18 Thread David Wheeler
Hi, We’re seeing deadlock semi-regularly (0-2 per day) that I’m really having trouble getting to the bottom of. Process 7172 waits for ShareLock on transaction 4078724272; blocked by process 7186. Process 7186 waits for ShareLock on transaction 4078724210; blocked by process 7172. The two