pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Sjöblom <robert.sjoblom@fortnox.se>
To: pgsql-hackers@lists.postgresql.org
Subject: [DOC] Update ALTER SUBSCRIPTION documentation
Date: Fri, 5 May 2023 15:17:31 +0200
Message-ID: <807bdf85-61ea-88e2-5712-6d9fcd4eabff@fortnox.se> (raw)
In-Reply-To: <983fb847-fbd6-08d2-8199-1056cad43c6c@fortnox.se>
References: <983fb847-fbd6-08d2-8199-1056cad43c6c@fortnox.se>


Hi,

We have recently used the PostgreSQL documentation when setting up our 
logical replication. We noticed there was a step missing in the 
documentation on how to drop a logical replication subscription with a 
replication slot attached.

We clarify the documentation to include prerequisites for running the 
DROP SUBSCRIPTION command. Please see attached patch.

Best regards,
Robert Sjöblom,
Oscar Carlberg
-- 
Innehållet i detta e-postmeddelande är konfidentiellt och avsett endast för 
adressaten.Varje spridning, kopiering eller utnyttjande av innehållet är 
förbjuden utan tillåtelse av avsändaren. Om detta meddelande av misstag 
gått till fel adressat vänligen radera det ursprungliga meddelandet och 
underrätta avsändaren via e-post

Attachments:

v1-doc-update-replication-slot-disable.patch (text/x-patch, 1.2K) download diff --git a/doc/src/sgml/ref/drop_subscription.sgml b/doc/src/sgml/ref/drop_subscription.sgml index 8d997c983f..81b3051070 100644 --- a/doc/src/sgml/ref/drop_subscription.sgml +++ b/doc/src/sgml/ref/drop_subscription.sgml @@ -86,8 +86,10 @@ DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable either because the remote host is not reachable or because the remote replication slot cannot be dropped or does not exist or never existed, the <command>DROP SUBSCRIPTION</command> command will fail. To proceed in - this situation, disassociate the subscription from the replication slot by - executing <literal>ALTER SUBSCRIPTION ... SET (slot_name = NONE)</literal>. + this situation, first disable the subscription with + <literal>ALTER SUBSCRIPTION ... DISABLE</literal>. Then disassociate the + subscription from the replication slot by executing + <literal>ALTER SUBSCRIPTION ... SET (slot_name = NONE)</literal>. After that, <command>DROP SUBSCRIPTION</command> will no longer attempt any actions on a remote host. Note that if the remote replication slot still exists, it (and any related table synchronization slots) should then be

view thread (6+ messages)  latest in thread

Message-ID: <807bdf85-61ea-88e2-5712-6d9fcd4eabff@fortnox.se>
Permalink:  ../807bdf85-61ea-88e2-5712-6d9fcd4eabff@fortnox.se/
Also on:    postgresql.org/message-id/807bdf85-61ea-88e2-5712-6d9fcd4eabff@fortnox.se

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: robert.sjoblom@fortnox.se, pgsql-hackers@lists.postgresql.org
  Subject: Re: [DOC] Update ALTER SUBSCRIPTION documentation
  In-Reply-To: <807bdf85-61ea-88e2-5712-6d9fcd4eabff@fortnox.se>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox