Help Center/ GaussDB(DWS)/ Troubleshooting/ Database Use/ Failed to Execute MERGE INTO UPDATE for Multiple Tables
Updated on 2024-03-08 GMT+08:00

Failed to Execute MERGE INTO UPDATE for Multiple Tables

Symptom

Failed to execute MERGE INTO UPDATE for multiple tables.

Possible Causes

The following error log is printed:

1
dn_6007_6008 YY003 79375943437085786 [BACKEND] DETAIL:  blocked by hold lock thread 0, statement <pending twophase transaction>, hold lockmode (null).

This fault is caused by distributed locks. Two DNs lock their own data blocks and wait for the data block of the other. As a result, the locks time out.

This is a feature of two-phase locks, and this fault occurs in distributed situations.

Handling Procedure

Run the merge command to change the concurrent operations to serial operations on a single table.