diff options
author | Dean Rasheed <dean.a.rasheed@gmail.com> | 2025-09-04 11:50:59 +0100 |
---|---|---|
committer | Dean Rasheed <dean.a.rasheed@gmail.com> | 2025-09-04 11:50:59 +0100 |
commit | 5481cc332b0fc8ca242966813a6675a514c6917b (patch) | |
tree | 4fbcf670f9a030761eef58b6e0de4ac29e68af6d /src/include/executor | |
parent | 451b22efd9ac4a1014af8add5405d809d92ff590 (diff) |
Fix replica identity check for MERGE.
When executing a MERGE, check that the target relation supports all
actions mentioned in the MERGE command. Specifically, check that it
has a REPLICA IDENTITY if it publishes updates or deletes and the
MERGE command contains update or delete actions. Failing to do this
can silently break replication.
Author: Zhijie Hou <houzj.fnst@fujitsu.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>
Tested-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/OS3PR01MB57180C87E43A679A730482DF94B62@OS3PR01MB5718.jpnprd01.prod.outlook.com
Backpatch-through: 15
Diffstat (limited to 'src/include/executor')
-rw-r--r-- | src/include/executor/executor.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index fe5910cf79c..bce1aa6da39 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -199,7 +199,8 @@ extern void ExecutorRewind(QueryDesc *queryDesc); extern bool ExecCheckRTPerms(List *rangeTable, bool ereport_on_violation); extern bool ExecCheckRTEPerms(RangeTblEntry *rte); extern void CheckValidResultRelNew(ResultRelInfo *resultRelInfo, CmdType operation, - OnConflictAction onConflictAction); + OnConflictAction onConflictAction, + List *mergeActions); extern void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation); extern void InitResultRelInfo(ResultRelInfo *resultRelInfo, Relation resultRelationDesc, |