Re: max_replication_slots in subscriber for subscription?

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: jonny(dot)battiato(at)gmail(dot)com
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: max_replication_slots in subscriber for subscription?
Date: 2017-10-02 13:12:41
Message-ID: 20171002131241.wi4zgyf2mhbchgbe@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

jonny(dot)battiato(at)gmail(dot)com wrote:

> In this section:
> https://www.postgresql.org/docs/10/static/logical-replication-config.html
>
> the following sentences make no sense in the way replication slots are
> designed:
>
> &quot;The subscriber also requires the max_replication_slots to be set. In this
> case it should be set to at least the number of subscriptions that will be
> added to the subscriber.&quot;
>
> I can understand if the subscriber would be used as a publisher as well, so
> the second sentence could make more sense as follows:
>
> &quot;In this case it should be set to at least the number of publications that
> will be added to the subscriber.&quot;
>
> Could you please check?
> And if I&#39;m wrong, I would appreciate a little more clear explanation.

Apparently, the reason for this (and correct me if I'm wrong) is that
the maximum number of replication origins is determined from
max_replication_slots, too. So the subscriber does not actually use any
slots, but it needs some replication origins, which is why you need to
increase the parameter.

This seems a little silly to me, but patching the server to add the new
variable is surely out of discussion for pg10. Should we change it in
pg11?

Also, do we want to add a footnote explaining this?

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message marco.pennekamp96 2017-10-02 15:37:09 Levenshtein function cost parameters are in the wrong order
Previous Message buck 2017-09-30 14:18:56 Document PUBLIC grants on PUBLIC schema