diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index 8eda2a6d9bc4ef71b6d6ffd0061fc4b5dab9e73e..8a4cd9eb0114c320583897a46b8b7bbb26b2777f 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -732,8 +732,12 @@ ExecDelete(ItemPointer tupleid, * utility mode) or there is bug in code, etc. */ if (segid != GpIdentity.segindex) - elog(ERROR, "distribution key of the tuple doesn't belong to " - "current segment (actually from seg%d)", segid); + elog(ERROR, + "distribution key of the tuple (%u, %u) doesn't belong to " + "current segment (actually from seg%d)", + BlockIdGetBlockNumber(&(tupleid->ip_blkid)), + tupleid->ip_posid, + segid); /* * get information on the (current) result relation @@ -1269,8 +1273,12 @@ ExecUpdate(ItemPointer tupleid, * utility mode) or there is bug in code, etc. */ if (segid != GpIdentity.segindex) - elog(ERROR, "distribution key of the tuple doesn't belong to " - "current segment (actually from seg%d)", segid); + elog(ERROR, + "distribution key of the tuple (%u, %u) doesn't belong to " + "current segment (actually from seg%d)", + BlockIdGetBlockNumber(&(tupleid->ip_blkid)), + tupleid->ip_posid, + segid); /* * get information on the (current) result relation diff --git a/src/test/isolation2/expected/modify_table_data_corrupt.out b/src/test/isolation2/expected/modify_table_data_corrupt.out index cfa939be82056a7a77a3956d071cb5f398ccca54..adbb792cd9d5fa75a0077018d74e42aa93343e35 100644 --- a/src/test/isolation2/expected/modify_table_data_corrupt.out +++ b/src/test/isolation2/expected/modify_table_data_corrupt.out @@ -81,7 +81,7 @@ explain (costs off) delete from tab1 using tab2, tab3 where tab1.a = tab2.a and begin; BEGIN delete from tab1 using tab2, tab3 where tab1.a = tab2.a and tab1.b = tab3.b; -ERROR: distribution key of the tuple doesn't belong to current segment (actually from seg0) (nodeModifyTable.c:737) (seg1 127.0.1.1:7003 pid=56444) (nodeModifyTable.c:737) +ERROR: distribution key of the tuple (0, 1) doesn't belong to current segment (actually from seg0) (nodeModifyTable.c:735) (seg1 127.0.1.1:7003 pid=89508) (nodeModifyTable.c:735) abort; ABORT @@ -108,7 +108,7 @@ explain (costs off) update tab1 set a = 999 from tab2, tab3 where tab1.a = tab2. begin; BEGIN update tab1 set a = 999 from tab2, tab3 where tab1.a = tab2.a and tab1.b = tab3.b; -ERROR: distribution key of the tuple doesn't belong to current segment (actually from seg0) (nodeModifyTable.c:1284) (seg1 127.0.1.1:7003 pid=56444) (nodeModifyTable.c:1284) +ERROR: distribution key of the tuple (0, 1) doesn't belong to current segment (actually from seg0) (nodeModifyTable.c:1276) (seg1 127.0.1.1:7003 pid=89508) (nodeModifyTable.c:1276) abort; ABORT diff --git a/src/test/isolation2/expected/modify_table_data_corrupt_optimizer.out b/src/test/isolation2/expected/modify_table_data_corrupt_optimizer.out index 1923f4b4c5d0d7ca3e4aafe8a5dc3ad816ce891c..7ad2dc443abdceb7fb673930d0e31ea2b8514613 100644 --- a/src/test/isolation2/expected/modify_table_data_corrupt_optimizer.out +++ b/src/test/isolation2/expected/modify_table_data_corrupt_optimizer.out @@ -137,7 +137,7 @@ explain (costs off) delete from tab1 using tab2, tab3 where tab1.a = tab2.a and begin; BEGIN delete from tab1 using tab2, tab3 where tab1.a = tab2.a and tab1.b = tab3.a; -ERROR: distribution key of the tuple doesn't belong to current segment (actually from seg0) (nodeModifyTable.c:737) (seg1 127.0.1.1:7003 pid=57517) (nodeModifyTable.c:737) +ERROR: distribution key of the tuple (0, 1) doesn't belong to current segment (actually from seg0) (nodeModifyTable.c:735) (seg1 127.0.1.1:7003 pid=89090) (nodeModifyTable.c:735) abort; ABORT @@ -166,7 +166,7 @@ explain (costs off) update tab1 set a = 999 from tab2, tab3 where tab1.a = tab2. begin; BEGIN update tab1 set a = 999 from tab2, tab3 where tab1.a = tab2.a and tab1.b = tab3.a; -ERROR: distribution key of the tuple doesn't belong to current segment (actually from seg0) (nodeModifyTable.c:737) (seg1 127.0.1.1:7003 pid=47425) (nodeModifyTable.c:737) +ERROR: distribution key of the tuple (0, 1) doesn't belong to current segment (actually from seg0) (nodeModifyTable.c:735) (seg1 127.0.1.1:7003 pid=89090) (nodeModifyTable.c:735) abort; ABORT @@ -190,7 +190,7 @@ explain (costs off) update tab1 set b = b + 1; begin; BEGIN update tab1 set b = b + 1; -ERROR: distribution key of the tuple doesn't belong to current segment (actually from seg0) (nodeModifyTable.c:737) (seg1 127.0.1.1:7003 pid=47425) (nodeModifyTable.c:737) +ERROR: distribution key of the tuple (0, 1) doesn't belong to current segment (actually from seg0) (nodeModifyTable.c:735) (seg1 127.0.1.1:7003 pid=89090) (nodeModifyTable.c:735) abort; ABORT