"ERROR: tuple to be updated was already moved to another segment due to concurrent update" error when updating the same table with two concurrent sessions in Tanzu Greenplum
search cancel

"ERROR: tuple to be updated was already moved to another segment due to concurrent update" error when updating the same table with two concurrent sessions in Tanzu Greenplum

book

Article ID: 296672

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

When updating the same table with two concurrent sessions, you see this error:
session A begin transaction
postgres=> begin transaction;
BEGIN
update dba_test1 set c2=6; 22UPDATE 2
session B update the same table before session A commit.
postgres=# update dba_test1 set c2=7 where c1=1;
(session B will be blocked)
Session A commit;
postgres=> commit;
COMMIT
session B
ERROR: tuple to be updated was already moved to another segment due to concurrent update (seg4 192.168.1.3:6000 pid=31375)

This issue occurs during the the update because Greenplum has gp_enable_global_deadlock_detector set to on.

When gp_enable_global_deadlock_detector is enabled and it is using ORCA, the update will always be a split-update.

Environment

Product Version: 6.14

Resolution

To work around this issue, do either of the following:

a. Set gp_enable_global_deadlock_detector=on and turn off ORCA for the concurrent update jobs.

b. Set gp_enable_global_deadlock_detector to the default off value.