Re: [DOC] Update ALTER SUBSCRIPTION documentation
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: Robert Sjöblom <robert.sjoblom@fortnox.se>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2023-05-08T03:38:53Z
Lists: 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
Commits
-
Fix the errhint message and docs for drop subscription failure.
- a734caa25f79 16.0 landed
- fd079193d24c 15.4 landed
- 0b79042701ff 14.9 landed
- 4b4ee1e2b073 13.12 landed
- 0e73b9ae6c5f 12.16 landed
- 6973868c9dbc 11.21 landed
-
doc: Add more details about pg_stat_get_xact_blocks_{fetched,hit}
- e126d817c7af 16.0 cited
-
Doc: mention CREATE+ATTACH PARTITION with CREATE TABLE...PARTITION OF.
- f170b572d2b4 16.0 cited