pgsql: Don't rely on uninitialized value in MERGE / DELETE

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't rely on uninitialized value in MERGE / DELETE
Date: 2023-02-15 19:38:41
Message-ID: E1pSNc1-001JRl-6m@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)gmail(dot)com>
Reviewed-by: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Discussion: https://postgr.es/m/17792-0f89452029662c36@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/fd923b5de94cdd3a7d05dcb843667dc228ea7fa3

Modified Files
--------------
src/backend/executor/nodeModifyTable.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-02-15 22:40:05 pgsql: Add description for new patterns supported in HBA and ident samp
Previous Message David Rowley 2023-02-15 08:22:29 pgsql: Rename force_parallel_mode to debug_parallel_query