On 9/26/23 16:27, Benoit Lobréau wrote:
I will try to come up with a documentation patch.

This is my attempt at a documentation patch.

--
Benoit Lobréau
Consultant
http://dalibo.com
From a73baa91032fff37ef039168c276508553830f86 Mon Sep 17 00:00:00 2001
From: benoit <benoit.lobr...@dalibo.com>
Date: Tue, 26 Sep 2023 18:07:47 +0200
Subject: [PATCH] Doc patch for require_password

Add documentation to ALTER / DROP SUBSCRIPTION regarding non-superuser
subscriptions with require_password=true.
---
 doc/src/sgml/ref/alter_subscription.sgml | 3 +++
 doc/src/sgml/ref/drop_subscription.sgml  | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml
index a85e04e4d6..0bbe7e2335 100644
--- a/doc/src/sgml/ref/alter_subscription.sgml
+++ b/doc/src/sgml/ref/alter_subscription.sgml
@@ -51,6 +51,9 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
    to alter the owner, you must be able to <literal>SET ROLE</literal> to the
    new owning role. If the subscription has
    <literal>password_required=false</literal>, only superusers can modify it.
+   If the ownership of a subscription with <literal>password_required=true</literal>
+   is transferred to a non-superuser, they will gain full control over the subscription
+   but will not be able to modify it's connection string.
   </para>
 
   <para>
diff --git a/doc/src/sgml/ref/drop_subscription.sgml b/doc/src/sgml/ref/drop_subscription.sgml
index 2a67bdea91..8ec743abd0 100644
--- a/doc/src/sgml/ref/drop_subscription.sgml
+++ b/doc/src/sgml/ref/drop_subscription.sgml
@@ -102,6 +102,12 @@ DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable
    If a subscription is associated with a replication slot, then <command>DROP
    SUBSCRIPTION</command> cannot be executed inside a transaction block.
   </para>
+
+  <para>
+   If the ownership of a subscription with <literal>password_required=true</literal>
+   has been transferred to a non-superuser, it must be reverted to a superuser for
+   the DROP operation to succeed.
+  </para>
  </refsect1>
 
  <refsect1>
-- 
2.41.0

Reply via email to