On Fri, Aug 05, 2022 at 09:16:57PM +0000, PG Bug reporting form wrote:
> My expectations was that the session with longer deadlock timeout should
> always win and session with shorter deadlock timeout should lost locking
> race (and error out with deadlock message).
That holds if all edges of the deadlock are in lock waits by the time of the
shorter deadlock timeout. Otherwise, since each session runs the deadlock
detector only once, the longer timeout will be the one to error out.