From 3099254486e8377e76330fb9b5767c93f0fa60cc Mon Sep 17 00:00:00 2001 From: shveta malik Date: Wed, 2 Dec 2026 10:00:00 +0530 Subject: [PATCH v2] Doc: explain privileges on conflict log tables. ALTER DEFAULT PRIVILEGES IN SCHEMA pg_conflict is accepted, but the default privileges are not applied to conflict log tables. Document how privileges on conflict log tables work, including which granted privileges have an effect, and add a note to the ALTER DEFAULT PRIVILEGES page. --- doc/src/sgml/logical-replication.sgml | 16 ++++++++++++++++ doc/src/sgml/ref/alter_default_privileges.sgml | 8 ++++++++ 2 files changed, 24 insertions(+) diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index 66dbb65..9dd2cbb 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -2286,6 +2286,22 @@ DETAIL: detailed_explanation[: . + + The conflict log table is owned by the subscription owner. To allow + other roles to access it, privileges on it must be granted with + GRANT; default + privileges set with + ALTER DEFAULT PRIVILEGES + are not applied to it. Only the system can add or change rows in the + table, so granting INSERT or + UPDATE has no effect. Granting + SELECT, DELETE or + TRUNCATE allows other roles to read or remove rows. + Privileges granted on the table are lost if the table is dropped, for + example when conflict_log_destination is changed to + log. + + Only resolved conflicts (logged at LOG level where the diff --git a/doc/src/sgml/ref/alter_default_privileges.sgml b/doc/src/sgml/ref/alter_default_privileges.sgml index 6acd0f1..5eae759 100644 --- a/doc/src/sgml/ref/alter_default_privileges.sgml +++ b/doc/src/sgml/ref/alter_default_privileges.sgml @@ -214,6 +214,14 @@ REVOKE [ GRANT OPTION FOR ] or use DROP OWNED BY to get rid of the default privileges entry for the role. + + + Default privileges are not applied to the + conflict + log tables that subscriptions create in the + pg_conflict + schema. Privileges on a conflict log table must be granted explicitly. + -- 2.43.0