On Thu, Feb 25, 2021 at 5:31 AM Amit Kapila <amit.kapil...@gmail.com> wrote: > > For docs only patch, I have few suggestions: > 1. On page [1], it is not very clear that we are suggesting to set > max_replication_slots for origins whereas your new doc patch has > clarified it, can we update the other page as well.
Sorry, what other page are you referring to? > 2. > Setting it a lower value than the current > + number of tracked replication origins (reflected in > + <link > linkend="view-pg-replication-origin-status">pg_replication_origin_status</link>, > + not <link > linkend="catalog-pg-replication-origin">pg_replication_origin</link>) > + will prevent the server from starting. > + </para> > > Why can't we just mention pg_replication_origin above? > So this is slightly confusing: pg_replication_origin just contains mappings from origin names to oids. It is regular catalog table and has no limit on its size. Users can also manually insert rows into this table. https://www.postgresql.org/docs/13/catalog-pg-replication-origin.html The view showing the in-memory information is actually pg_replication_origin_status. The number of entries here is what is actually constrained by the GUC parameter. https://www.postgresql.org/docs/13/view-pg-replication-origin-status.html I clarified pointing to pg_replication_origin_status because it could in theory be out of sync with pg_replication_origin. I'm actually not sure how entries there are managed. Perhaps if you were replicating from one database and then stopped and started replicating from another database you'd have two replication origins, but only one replication origin status? This also brings up a point regarding the naming of the added GUC. max_replication_origins is cleanest, but has this confusion regarding pg_replication_origin vs. pg_replication_origin_status. max_replication_origin_statuses is weird (and long). max_tracked_replication_origins is a possibility? (One last bit of naming confusion; the internal code refers to them as ReplicationStates, rather than ReplicationOrigins or ReplicationOriginStatuses, or something like that.) - Paul