Re: [DOC] Update ALTER SUBSCRIPTION documentation

Поиск
Список
Период
Сортировка
От Peter Smith
Тема Re: [DOC] Update ALTER SUBSCRIPTION documentation
Дата
Msg-id CAHut+Pt6PYiMy16MdL1+y5s6YeVQ48CtRxP2COobpNMiGs86iQ@mail.gmail.com
обсуждение исходный текст
Ответ на [DOC] Update ALTER SUBSCRIPTION documentation  (Robert Sjöblom <robert.sjoblom@fortnox.se>)
Список pgsql-hackers
On Fri, May 5, 2023 at 11:17 PM Robert Sjöblom
<robert.sjoblom@fortnox.se> wrote:
>
>
> 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.

Right, there is a "missing step" in the documentation, but OTOH that
step is going to be obvious from the error you get when attempting to
set the slot_name to NONE:

e.g.
test_sub=# ALTER SUBSCRIPTION sub1 SET (slot_name= NONE);
ERROR:  cannot set slot_name = NONE for enabled subscription

~

IMO this scenario is sort of a trade-off between (a) wanting to give
every little step explicitly versus (b) trying to keep the
documentation free of clutter.

I think a comprise here is just to mention the need for disabling the
subscription but without spelling out the details of the ALTER ...
DISABLE command.

For example,

BEFORE
To proceed in this situation, disassociate the subscription from the
replication slot by executing ALTER SUBSCRIPTION ... SET (slot_name =
NONE).

SUGGESTION
To proceed in this situation, first DISABLE the subscription, and then
disassociate it from the replication slot by executing ALTER
SUBSCRIPTION ... SET (slot_name = NONE).

------
Kind Regards,
Peter Smith.
Fujitsu Australia



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Add PQsendSyncMessage() to libpq
Следующее
От: "Zhijie Hou (Fujitsu)"
Дата:
Сообщение: RE: Perform streaming logical transactions by background workers and parallel apply