]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Don't rely on uninitialized value in MERGE / DELETE
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 15 Feb 2023 19:37:44 +0000 (20:37 +0100)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 15 Feb 2023 19:37:44 +0000 (20:37 +0100)
commit5d8ec1b9f625be800c8db93408e7c0553356fcd3
tree727a9d90ab2db7ee4d9563e3cf92143b988a3342
parent5fd61055eacf3d0c45be20b90402a87c9848db43
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 <exclusion@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://postgr.es/m/17792-0f89452029662c36@postgresql.org
src/backend/executor/nodeModifyTable.c