[pgpool-general: 5779] Re: How to configure replication mode?

Bo Peng pengbo at sraoss.co.jp
Wed Oct 18 12:45:35 JST 2017


Hello,

Did you disable the master_slave_mode?

---
master_slave_mode = off
---

On Tue, 17 Oct 2017 09:42:51 +0200
Nicolas Karolak <nicolas.karolak at ubicast.eu> wrote:

> Hello,
> 
> I'm trying to setup a pgpool2 in replication mode, replicating to two
> postgresql servers (under Ubuntu 16.04). I read a lot of tutorials
> (like this one http://www.pgpool.net/docs/latest/tutorial-en.html) and
> documentation. It seems very simple. But i cannot make it work… It
> only send data to backend0 and never to backend1.
> 
> PostgreSQL servers have default configuration, except for
> `listen_adresses = '*'` and in pg_hba.conf `host all all
> 10.64.249.0/24 trust` to allow remote connections. Everything else is
> untouched.
> 
> From the pgpool2 server, i can connect to both of them:
> `sudo -u postgres psql -h 10.64.249.200 -l`
> `sudo -u postgres psql -h 10.64.249.191 -l`
> 
> Changed params in pgpool.conf are:
> ```
> port = 5432
> 
> backend_hostname0 = '10.64.249.200'
> backend_port0 = 5432
> backend_weight0 = 1
> backend_data_directory0 = '/var/lib/postgresql/10/main'
> backend_flag0 = 'ALLOW_TO_FAILOVER'
> backend_hostname1 = '10.64.249.191'
> backend_port1 = 5432
> backend_weight1 = 1
> backend_data_directory1 = '/var/lib/postgresql/10/main'
> backend_flag1 = 'ALLOW_TO_FAILOVER'
> 
> replication_mode = on
> 
> load_balance_mode = on
> 
> black_function_list = 'nextval,setval'
> ```
> 
> On the pgpool server i did `sudo -u postgres createdb test1` and after
> that `test1` was replicated only to backend0.
> 
> Is there something missing or misconfigured ?
> 
> Thanks for the help.
> 
> -- 
> Regards,
> Nicolas KAROLAK | SysAdmin
> 6-8, rue André Voguet - 94200 Ivry-sur-Seine
> +33 1 77 56 77 96 | www.ubicast.eu | www.ubicast.tv
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan



More information about the pgpool-general mailing list