pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use appropriate tuple descriptor in FDW batching
Date: Thu, 12 Aug 2021 20:10:17 +0000
Message-ID: <E1mEH1t-0004TT-30@gemulon.postgresql.org> (raw)

Use appropriate tuple descriptor in FDW batching

The FDW batching code was using the same tuple descriptor both for all
slots (regular and plan slots), but that's incorrect - the subplan may
use a different descriptor. Currently this is benign, because batching
is used only for INSERTs, and in that case the descriptors always match.
But that would change if we allow batching UPDATEs.

Fix by copying the appropriate tuple descriptor. Backpatch to 14, where
the FDW batching was implemented.

Author: Amit Langote
Backpatch-through: 14, where FDW batching was added
Discussion: https://postgr.es/m/CA%2BHiwqEWd5B0-e-RvixGGUrNvGkjH2s4m95%3DJcwUnyV%3Df0rAKQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/650663b4cb4714a34d7171981de4392486a85f86

Modified Files
--------------
src/backend/executor/nodeModifyTable.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)



view thread (2+ messages)

Message-ID: <E1mEH1t-0004TT-30@gemulon.postgresql.org>
Permalink:  ../E1mEH1t-0004TT-30@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mEH1t-0004TT-30@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: tomas.vondra@postgresql.org
  Subject: Re: pgsql: Use appropriate tuple descriptor in FDW batching
  In-Reply-To: <E1mEH1t-0004TT-30@gemulon.postgresql.org>
  References: <E1mEH1t-0004TT-30@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