From cfc2e09491a9d8f02e29610bca4934fae9acde38 Mon Sep 17 00:00:00 2001 From: Robert Treat Date: Fri, 3 Jan 2025 12:10:43 -0500 Subject: [PATCH] Replica Identity clarifications. Based on discussion from James Coleman, Peter Smith, Laurenz Albe, and Amit Kapala. --- doc/src/sgml/logical-replication.sgml | 6 ++++-- doc/src/sgml/ref/alter_table.sgml | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index 8290cd1a08..65996a3f9e 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -144,13 +144,15 @@ fallback if no other solution is possible. If a replica identity other than FULL is set on the publisher side, a replica identity comprising the same or fewer columns must also be set on the subscriber - side. See for details on - how to set the replica identity. If a table without a replica identity is + side. If a table with replica identity set to NOTHING + (or set to use a primary key or index that doesn't exist) is added to a publication that replicates UPDATE or DELETE operations then subsequent UPDATE or DELETE operations will cause an error on the publisher. INSERT operations can proceed regardless of any replica identity. + See for details on + how to set the replica identity. diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index c8f7ab7d95..a09a5cc2ce 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref/alter_table.sgml @@ -927,7 +927,8 @@ WITH ( MODULUS numeric_literal, REM DEFAULT - Records the old values of the columns of the primary key, if any. + Records the old values of the columns of the primary key. When there + is no primary key, the behavior is the same as NOTHING. This is the default for non-system tables. -- 2.24.3 (Apple Git-128)