[pgpool-general: 4970] Re: PGPool - native replication not working
Tatsuo Ishii
ishii at sraoss.co.jp
Thu Sep 8 07:40:05 JST 2016
> Hi I am trying to setup PGPool with native replication (ie: using PGPools replication functionality) and it doesn't appear to be working.
Which version of Pgpool-II?
> Server config
> ------------------
> PGPool installed on 1 server
> PGServer1
> PGServer2
>
> I insert data into the PGPool instance and data is only inserted into one PGServer1 and NOT the other PGServer2
>
> My PGPool config is as follows:
> -----------------------------------------
> # - Backend Connection Settings -
> backend_hostname0 = 'PGServer1'
> backend_port0 = 5432
> backend_weight0 = 0
> backend_data_directory0 = '/postgres/data/'
> backend_flag0 = 'ALLOW_TO_FAILOVER'
>
> backend_hostname1 = 'PGServer2'
> backend_port1 = 5433
> backend_weight1 = 0
> backend_data_directory1 = '/postgres/data'
> backend_flag1 = 'ALLOW_TO_FAILOVER'
>
> # - Replication settings
> replication_mode = on
> load_balance_mode = on
> master_slave_mode = off
>
> Also when I do a show pool_nodes it seems to indicate a master/slave setup? Is this correct? I have turned master/slave off .
Yes, normal. In native replication mode, "master" is just the first DB
node whcih is alive, appearing in the pgpool.conf. Other nodes are
called "slave".
>> show pool_nodes;
> node_id | hostname | port | status | lb_weight | role
> ---------+---------------------------+------+--------+-----------+--------
> 0 | PGServer1| 5432 | 2 | -nan | master
> 1 | PGServer2 | 5433 | 3 | -nan | slave
>
> Does anything else need to be done to get PGPool native replication working? ie: not postgres streaming replication or do you need to have postgres replication enabled?
The reason data does not get inserted to PGServer2 is, it's status is
3 (meaning down). If you are sure that PGServer2 is up and running and
data is sync with PGServer1, you can use pcp_attach_node to let
PGServer2 online from Pgpool-II's perspective.
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
More information about the pgpool-general
mailing list