pgsql: Use appropriate tuple descriptor in FDW batching - Mailing list pgsql-committers

From Tomas Vondra
Subject pgsql: Use appropriate tuple descriptor in FDW batching
Date
Msg-id E1mEH1P-0004S2-LK@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/886531f3f403cae67a4537f0a2a1edc730f6b793

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


pgsql-committers by date:

Previous
From: John Naylor
Date:
Subject: pgsql: Speed up generation of Unicode hash functions.
Next
From: Tomas Vondra
Date:
Subject: pgsql: Use appropriate tuple descriptor in FDW batching