An update deadlock bug - Mailing list pgsql-bugs

From 1024
Subject An update deadlock bug
Date
Msg-id tencent_639AC1C2CA95490C1CE28F9F9AC74C6BE406@qq.com
Whole thread Raw
Responses Re: An update deadlock bug  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hello everyone:

Recently I found a parallel update bug,The steps to recurrence are as follows:
1,create table t1(a int, b varchar(20));
   insert into t1 values(generate_series(1,5), 'abc');
2, use pgbench to run parallel update:
    pgbench -U postgres -p 5432 postgres -n -r -c 10 -j 1 -T 100 -P 1 -f test.sql

    test.sql:  update t1 set a = 123 where b = 'abc';
3, We will find "deadlock detected" in log file or terminal.

I want to figure out that if every update use sequence scan ,why deadlock happened?

I look forward to receiving your reply.

Thank you very much!

pgsql-bugs by date:

Previous
From: John Naylor
Date:
Subject: Re: operator class "xxx" does not exist for access method "yyy"
Next
From: Daniel Gustafsson
Date:
Subject: Re: BUG #17863: Unable to restore dump 12.12 -> 15.2