Re: algo for canceling a deadlocked transaction

2018-04-09 Thread Thomas Poty
Hello Tom, Thank you for the clarification! Regards, Thomas Le lun. 9 avr. 2018 à 17:04, Tom Lane a écrit : > Christophe Pettus writes: > >> On Apr 9, 2018, at 07:33, Thomas Poty wrote: > >> ok, and long answer ? is it random?

Re: algo for canceling a deadlocked transaction

2018-04-09 Thread Tom Lane
Christophe Pettus writes: >> On Apr 9, 2018, at 07:33, Thomas Poty wrote: >> ok, and long answer ? is it random? > It's not literally random, but from the application point of view, it's not > predictable. For example, it's not always the one that

Re: algo for canceling a deadlocked transaction

2018-04-09 Thread Christophe Pettus
> On Apr 9, 2018, at 07:33, Thomas Poty wrote: > > ok, and long answer ? is it random? It's not literally random, but from the application point of view, it's not predictable. For example, it's not always the one that opened first, or any other consistent measure. --

Re: algo for canceling a deadlocked transaction

2018-04-09 Thread Thomas Poty
Hello Stephen, > The short answer is "it's whichever one detected the deadlock." The > deadlock timeout fires after a lock has been held that long and if a > deadlock is detected then the process detecting it will be canceled. ok, and long answer ? is it random? > I'd strongly recommend

Re: algo for canceling a deadlocked transaction

2018-04-09 Thread Stephen Frost
Greetings, * Thomas Poty (thomas.p...@gmail.com) wrote: > My question is : In case of a deadlock between 2 transaction, how to know > which transaction will be canceled? Is it predictable? The short answer is "it's whichever one detected the deadlock." The deadlock timeout fires after a lock

algo for canceling a deadlocked transaction

2018-04-09 Thread Thomas Poty
Good afternoon, My question is : In case of a deadlock between 2 transaction, how to know which transaction will be canceled? Is it predictable? I have tried to look into sources but i have found nothing. ( probably, i am the problem) Regards, Thomas