From 167d4f9c0b157d77b33563827d20a37e18950b69 Mon Sep 17 00:00:00 2001 From: Matthias van de Meent Date: Mon, 22 Apr 2024 11:53:38 +0200 Subject: [PATCH v1 4/5] Remove field ExecRowMark.ermExtra The field was write-only since its introduction in 2015 with afb9249d, and no uses of the field have been found. --- src/backend/executor/execMain.c | 1 - src/include/nodes/execnodes.h | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 8a74d00303..9dce7bad51 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -909,7 +909,6 @@ InitPlan(QueryDesc *queryDesc, int eflags) erm->strength = rc->strength; erm->waitPolicy = rc->waitPolicy; ItemPointerSetInvalid(&(erm->curCtid)); - erm->ermExtra = NULL; Assert(erm->rti > 0 && erm->rti <= estate->es_range_table_size && estate->es_rowmarks[erm->rti - 1] == NULL); diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index fa1c84bb1a..52d7dca38d 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -736,9 +736,7 @@ typedef struct EState * PlanRowMark for details about most of the fields. In addition to fields * directly derived from PlanRowMark, we store an activity flag (to denote * inactive children of inheritance trees), curCtid, which is used by the - * WHERE CURRENT OF code, and ermExtra, which is available for use by the plan - * node that sources the relation (e.g., for a foreign table the FDW can use - * ermExtra to hold information). + * WHERE CURRENT OF code. * * EState->es_rowmarks is an array of these structs, indexed by RT index, * with NULLs for irrelevant RT indexes. es_rowmarks itself is NULL if @@ -755,7 +753,6 @@ typedef struct ExecRowMark LockClauseStrength strength; /* LockingClause's strength, or LCS_NONE */ LockWaitPolicy waitPolicy; /* NOWAIT and SKIP LOCKED */ ItemPointerData curCtid; /* ctid of currently locked tuple, if any */ - void *ermExtra; /* available for use by relation source node */ } ExecRowMark; /* -- 2.40.1