Don't rely on uninitialized value in MERGE / DELETE
authorAlvaro Herrera <[email protected]>
Wed, 15 Feb 2023 19:37:44 +0000 (20:37 +0100)
committerAlvaro Herrera <[email protected]>
Wed, 15 Feb 2023 19:37:44 +0000 (20:37 +0100)
commitfd923b5de94cdd3a7d05dcb843667dc228ea7fa3
tree7b8ee930097f44f5e9b0dd51e7ef639e5a8efe44
parent5352ca22e0012d48055453ca9992a9515d811291
Don't rely on uninitialized value in MERGE / DELETE

On MERGE / WHEN MATCHED DELETE it's not possible to get cross-partition
updates, so we don't initialize cpUpdateRetrySlot; however, the code was
not careful to ignore the value in that case.  Make it do so.

Backpatch to 15.

Reported-by: Alexander Lakhin <[email protected]>
Reviewed-by: Dean Rasheed <[email protected]>
Discussion: https://postgr.es/m/17792-0f89452029662c36@postgresql.org
src/backend/executor/nodeModifyTable.c