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

Nicolas Karolak nicolas.karolak at ubicast.eu
Tue Oct 17 16:42:51 JST 2017


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


More information about the pgpool-general mailing list