From 4245253180aeebeb2ca3a5245c7ba5f6774d54b0 Mon Sep 17 00:00:00 2001 From: Shlok Kyal Date: Wed, 18 Nov 2026 16:07:24 +0530 Subject: [PATCH v1] Document skipped deferrable constraint rechecks in replica mode --- doc/src/sgml/config.sgml | 7 ++++--- doc/src/sgml/logical-replication.sgml | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 886e8c44847..8c5e57087b7 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -10827,9 +10827,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; - Since foreign keys are implemented as triggers, setting this parameter - to replica also disables all foreign key checks, - which can leave data in an inconsistent state if improperly used. + Since foreign key checks and rechecks for deferrable unique, + primary key, and exclusion constraint are implemented as triggers, + setting this parameter to replica also disable these + checks. diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index 4701a3d9d18..4ba3cca71e2 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -2481,6 +2481,12 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER clauses. + + In particular, the recheck triggers for deferrable primary key, unique, and + exclusion constraints do not fire by default. This can allow inconsistent + data to be committed on the subscriber. + + The logical replication apply process currently only fires row triggers, not statement triggers. The initial table synchronization, however, is -- 2.34.1