4

I tried to setup "master - 2 slaves" configuration by article on digitalocean (https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresql-on-an-ubuntu-12-04-vps).

First slave successfully connected to master and works fine. Second slave cannot connect. From postgresql (second slave) log:

2015-11-02 11:17:35 MSK [14198-1] FATAL:  could not connect to the primary server: FATAL:  too many connections for role "rep"

From log of master server:

2015-11-02 11:17:32 MSK [18981-1] rep@[unknown] FATAL:  too many connections for role "rep"

Every slave need different user?

6

By default, postgresql limit connections for all roles. Resolution: set limit to -1 (ulimited) or something different:

ALTER ROLE rep CONNECTION LIMIT -1;

from atlassian

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy