pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix MERGE command tag for cross-partition updates.
Date: Wed, 22 Feb 2023 09:43:06 +0000
Message-ID: <E1pUleT-0006ty-My@gemulon.postgresql.org> (raw)

Fix MERGE command tag for cross-partition updates.

This ensures that the row count in the command tag for a MERGE is
correctly computed. Previously, if MERGE updated a partitioned table,
the row count would be incorrect if any row was moved to a different
partition, since such updates were counted twice.

Back-patch to v15, where MERGE was introduced.

Discussion: https://postgr.es/m/CAEZATCWRMG7XX2QEsVL1LswmNo2d_YG8tKTLkpD3=Lp644S7rg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/80a48e0f21c51ed65fe647b18019ab6f8eab15cd

Modified Files
--------------
src/backend/executor/nodeModifyTable.c |  2 +-
src/test/regress/expected/merge.out    | 16 ++++++++++++++++
src/test/regress/sql/merge.sql         | 11 +++++++++++
3 files changed, 28 insertions(+), 1 deletion(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1pUleT-0006ty-My@gemulon.postgresql.org>
Permalink:  ../E1pUleT-0006ty-My@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pUleT-0006ty-My@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: dean.a.rasheed@gmail.com
  Subject: Re: pgsql: Fix MERGE command tag for cross-partition updates.
  In-Reply-To: <E1pUleT-0006ty-My@gemulon.postgresql.org>
  References: <E1pUleT-0006ty-My@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