Parameter · Replication / Subscribers
max_active_replication_origins
Sets the maximum number of active replication origins.
- Default:
10 - Type: integer
- Range: 0 … 262143
- Applies: Restart required
In plain words
A subscriber remembers, per subscription, how far it has applied the publisher's changes. That bookkeeping is called a replication origin. max_active_replication_origins (new in PostgreSQL 18) is how many can be active at once, so it effectively caps the number of subscriptions (plus table sync work) on this server.
For DBAs and operators
Before PostgreSQL 18, origins were sized by max_replication_slots on the subscriber, a confusing double use. Upgrading clusters with many subscriptions should check the new default of 10. Each subscription uses one origin, and table synchronization workers use additional ones temporarily, so set it to at least the number of subscriptions plus some headroom.
ERROR: could not find free replication state slot for replication origin with ID 11
HINT: Increase "max_active_replication_origins" and try again.
With 0: ERROR: cannot start logical replication workers when "max_active_replication_origins" is 0. Setting it below the number currently in use prevents startup.
SELECT * FROM pg_replication_origin_status;
SELECT subname, subenabled FROM pg_subscription;How to change it
Change in postgresql.conf or ALTER SYSTEM, then restart the server.
See it in context
Related parameters
max_logical_replication_workers max_replication_slots max_sync_workers_per_subscription