pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Use appropriate tuple descriptor in FDW batching 2+ messages / 1 participants [nested] [flat]
* pgsql: Use appropriate tuple descriptor in FDW batching @ 2021-08-12 20:09 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2021-08-12 20:09 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Use appropriate tuple descriptor in FDW batching @ 2021-08-12 20:10 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2021-08-12 20:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-08-12 20:10 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-08-12 20:09 pgsql: Use appropriate tuple descriptor in FDW batching Tomas Vondra <tomas.vondra@postgresql.org> 2021-08-12 20:10 pgsql: Use appropriate tuple descriptor in FDW batching Tomas Vondra <tomas.vondra@postgresql.org>
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