pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't rely on uninitialized value in MERGE / DELETE
Date: Wed, 15 Feb 2023 19:38:41 +0000
Message-ID: <E1pSNc1-001JRm-7d@gemulon.postgresql.org> (raw)

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5d8ec1b9f625be800c8db93408e7c0553356fcd3

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



view thread (2+ messages)

Message-ID: <E1pSNc1-001JRm-7d@gemulon.postgresql.org>
Permalink:  ../E1pSNc1-001JRm-7d@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pSNc1-001JRm-7d@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Don't rely on uninitialized value in MERGE / DELETE
  In-Reply-To: <E1pSNc1-001JRm-7d@gemulon.postgresql.org>
  References: <E1pSNc1-001JRm-7d@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox