summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorEtsuro Fujita2022-12-08 07:15:03 +0000
committerEtsuro Fujita2022-12-08 07:15:03 +0000
commitd43a97ef493a7edc9e03b5dd15870e04a0c38f75 (patch)
tree4cbc37837d14cc4630b72be7ee9c089082340757 /src/include
parentdc3648f65bea3d3373b4e0026ae83bd8f436ee40 (diff)
Remove new structure member from ResultRelInfo.
In commit ffbb7e65a, I added a ModifyTableState member to ResultRelInfo to save the owning ModifyTableState for use by nodeModifyTable.c when performing batch inserts, but as pointed out by Tom Lane, that changed the array stride of es_result_relations, and that would break any previously-compiled extension code that accesses that array. Fix by removing that member from ResultRelInfo and instead adding a List member at the end of EState to save such ModifyTableStates. Per report from Tom Lane. Back-patch to v14, like the previous commit; I chose to apply the patch to HEAD as well, to make back-patching easy. Discussion: http://postgr.es/m/4065383.1669395453%40sss.pgh.pa.us
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nodes/execnodes.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 71d0cf44dd5..9a40a19303c 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -524,9 +524,6 @@ typedef struct ResultRelInfo
/* for use by copyfrom.c when performing multi-inserts */
struct CopyMultiInsertBuffer *ri_CopyMultiInsertBuffer;
-
- /* for use by nodeModifyTable.c when performing batch-inserts */
- struct ModifyTableState *ri_ModifyTableState;
} ResultRelInfo;
/* ----------------
@@ -650,10 +647,11 @@ typedef struct EState
struct JitInstrumentation *es_jit_worker_instr;
/*
- * The following list contains ResultRelInfos for foreign tables on which
- * batch-inserts are to be executed.
+ * Lists of ResultRelInfos for foreign tables on which batch-inserts are
+ * to be executed and owning ModifyTableStates, stored in the same order.
*/
List *es_insert_pending_result_relations;
+ List *es_insert_pending_modifytables;
} EState;