From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix replica identity check for MERGE. |
Date: | 2025-09-04 10:53:50 |
Message-ID: | E1uu7bC-000S0J-2M@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(dot)fnst(at)fujitsu(dot)com>
Reviewed-by: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Reviewed-by: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Tested-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Discussion: https://postgr.es/m/OS3PR01MB57180C87E43A679A730482DF94B62@OS3PR01MB5718.jpnprd01.prod.outlook.com
Backpatch-through: 15
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/5481cc332b0fc8ca242966813a6675a514c6917b
Modified Files
--------------
src/backend/executor/execMain.c | 27 ++++++++++++++++++++++++---
src/backend/executor/execPartition.c | 6 ++++--
src/backend/executor/nodeModifyTable.c | 6 +++++-
src/include/executor/executor.h | 3 ++-
src/test/regress/expected/publication.out | 28 ++++++++++++++++++++++++++++
src/test/regress/sql/publication.sql | 31 +++++++++++++++++++++++++++++++
6 files changed, 94 insertions(+), 7 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2025-09-04 15:05:35 | pgsql: Fix compiler error introduced by 5386bfb9c1f. |
Previous Message | Dean Rasheed | 2025-09-04 10:40:01 | pgsql: Fix replica identity check for INSERT ON CONFLICT DO UPDATE. |