Fix initialization of FDW batching in ExecInitModifyTable

Tomas Vondra <tomas.vondra@postgresql.org>

Commit: 920f853dc948b98a5dc96580c4ee011a302e33e4
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Date: 2021-01-21T02:34:32Z
Releases: 14.0
Fix initialization of FDW batching in ExecInitModifyTable

ExecInitModifyTable has to initialize batching for all result relations,
not just the first one. Furthermore, when junk filters were necessary,
the pointer pointed past the mtstate->resultRelInfo array.

Per reports from multiple non-x86 animals (florican, locust, ...).

Discussion: https://postgr.es/m/20200628151002.7x5laxwpgvkyiu3q@development

Files

PathChange+/−
src/backend/executor/nodeModifyTable.c modified +21 −10

Discussion