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

Bo Peng pengbo at sraoss.co.jp
Thu Oct 19 08:19:02 JST 2017


Hello,

If you use default port 9999 in Pgpool-II server,
can you connect both of PostgreSQL servers by using port 9999?

$ psql -h 10.64.249.200 -p 9999 -l 
$ psql -h 10.64.249.191 -p 9999 -l

Which OS do you use for the Pgpool-II server?
And can I see your pgpool.conf and pgpool.log?

On Wed, 18 Oct 2017 08:52:09 +0200
Nicolas Karolak <nicolas.karolak at ubicast.eu> wrote:

> Hello,
> 
> Yes i have.
> 
> 2017-10-18 5:45 GMT+02:00 Bo Peng <pengbo at sraoss.co.jp>:
> > 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
> >
> 
> 
> 
> -- 
> Cordialement,
> Nicolas KAROLAK | SysAdmin
> 6-8, rue André Voguet - 94200 Ivry-sur-Seine
> +33 1 77 56 77 96 | www.ubicast.eu | www.ubicast.tv
> 


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



More information about the pgpool-general mailing list