On Wed, Oct 12, 2022 at 12:34 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2022-Oct-11, Peter Smith wrote:
>
> > > BTW, do we want to slightly adjust the documentation for the
> > > connect option on CREATE SUBSCRIPTION page [1]? It says: "Since no
> > > connection is made when this option is false, no tables are
> > > subscribed, and so after you enable the subscription nothing will be
> > > replicated. You will need to then run ALTER SUBSCRIPTION ... REFRESH
> > > PUBLICATION for tables to be subscribed."
> > >
> > > It doesn't say anything about manually creating the slot and probably
> > > the wording can be made similar.
> >
> > PSA patch v3-0002 which changes CREATE SUBSCRIPTION pgdocs to use the
> > same wording as in the HINT message.
>
> I think we want the documentation to explain in much more detail what is
> meant. Users are going to need some help in determining which commands
> to run for each of the step mentioned in the hint, so I don't think we
> want the docs to say the same thing as the hint. How does the user know
> the name of the slot, what options to use, what are the commands to run
> afterwards.
>
I think it is a good idea to expand the docs for this but note that
there are multiple places that use a similar description. For example,
see the description slot_name option: "When slot_name is set to NONE,
there will be no replication slot associated with the subscription.
This can be used if the replication slot will be created later
manually. Such subscriptions must also have both enabled and
create_slot set to false.". Then, we have a few places in the logical
replication docs [1] that talk about creating the slot manually but
didn't explain in detail the name or options to use. We might want to
write a slightly bigger doc patch so that we can write the description
in one place and give reference to the same at other places.
[1] - https://www.postgresql.org/docs/devel/logical-replication-subscription.html
--
With Regards,
Amit Kapila.