Loading contrib/config +3 −3 Original line number Diff line number Diff line Loading @@ -4,8 +4,8 @@ JBOSS_STANDBY_HOST=172.16.0.104 # PostgreSQL replication host. # Can be same as PGPOOL watchdog and life check hosts PGSQL_PRIMARY_HOST=192.168.100.9 PGSQL_STANDBY_HOST=192.168.100.10 PGSQL_PRIMARY_HOST=192.168.100.2 PGSQL_STANDBY_HOST=192.168.100.4 # mod_cluster config CLUSTER_SUBNET=172.16.0. Loading @@ -15,5 +15,5 @@ CLUSTER_SUBNET=172.16.0. PGPOOL_PRIMARY_HOST=172.16.0.112 PGPOOL_STANDBY_HOST=172.16.0.114 PGPOOL_TRUSTED_SERVERS= PGPOOL_DELEGATE_IP=172.16.0.115 PGPOOL_DELEGATE_IP=172.16.0.125 PGPOOL_INTERFACE=eth0 pgpool/configure.sh +16 −15 Original line number Diff line number Diff line Loading @@ -102,9 +102,9 @@ if [[ "$CATEGORY" == "a" ]]; then sed -i 's/master_slave_mode = on/master_slave_mode = off/g' $PGPOOL_CONFIG sed -i '/^backend_hostname/s/^/#/' $PGPOOL_CONFIG sed -i '/^backend_port/s/^/#/' $PGPOOL_CONFIG sed -i '/^backend_weight/s/^/#' $PGPOOL_CONFIG sed -i '/^backend_data_directory/s/^/#' $PGPOOL_CONFIG sed -i '/^backend_flag/s/^/#' $PGPOOL_CONFIG sed -i '/^backend_weight/s/^/#/' $PGPOOL_CONFIG sed -i '/^backend_data_directory/s/^/#/' $PGPOOL_CONFIG sed -i '/^backend_flag/s/^/#/' $PGPOOL_CONFIG fi echo "postgres:"`pg_md5 postgres` >> $PGPOOL_DIR/pcp.conf Loading @@ -116,16 +116,17 @@ touch /etc/pgpool-II/pool_passwd chown postgres /etc/pgpool-II/pool_passwd mkdir /var/log/pgpool if [[ "$CATEGORY" == "b" ]]; then chown postgres /var/log/pgpool # Change default PostgreSQL port to 5433 sed -i "s/PGPORT=5432/PGPORT=5433/g" /etc/sysconfig/pgsql/postgresql /etc/init.d/postgresql restart chkconfig pgpool on # Add check status of nodes every minute into cron if ! grep -Fq "pg_auto_attach_node" /etc/crontab; then echo '* * * * * root /usr/local/bin/pg_auto_attach_node' >> /etc/crontab fi /etc/init.d/crond restart fi chkconfig pgpool on Loading
contrib/config +3 −3 Original line number Diff line number Diff line Loading @@ -4,8 +4,8 @@ JBOSS_STANDBY_HOST=172.16.0.104 # PostgreSQL replication host. # Can be same as PGPOOL watchdog and life check hosts PGSQL_PRIMARY_HOST=192.168.100.9 PGSQL_STANDBY_HOST=192.168.100.10 PGSQL_PRIMARY_HOST=192.168.100.2 PGSQL_STANDBY_HOST=192.168.100.4 # mod_cluster config CLUSTER_SUBNET=172.16.0. Loading @@ -15,5 +15,5 @@ CLUSTER_SUBNET=172.16.0. PGPOOL_PRIMARY_HOST=172.16.0.112 PGPOOL_STANDBY_HOST=172.16.0.114 PGPOOL_TRUSTED_SERVERS= PGPOOL_DELEGATE_IP=172.16.0.115 PGPOOL_DELEGATE_IP=172.16.0.125 PGPOOL_INTERFACE=eth0
pgpool/configure.sh +16 −15 Original line number Diff line number Diff line Loading @@ -102,9 +102,9 @@ if [[ "$CATEGORY" == "a" ]]; then sed -i 's/master_slave_mode = on/master_slave_mode = off/g' $PGPOOL_CONFIG sed -i '/^backend_hostname/s/^/#/' $PGPOOL_CONFIG sed -i '/^backend_port/s/^/#/' $PGPOOL_CONFIG sed -i '/^backend_weight/s/^/#' $PGPOOL_CONFIG sed -i '/^backend_data_directory/s/^/#' $PGPOOL_CONFIG sed -i '/^backend_flag/s/^/#' $PGPOOL_CONFIG sed -i '/^backend_weight/s/^/#/' $PGPOOL_CONFIG sed -i '/^backend_data_directory/s/^/#/' $PGPOOL_CONFIG sed -i '/^backend_flag/s/^/#/' $PGPOOL_CONFIG fi echo "postgres:"`pg_md5 postgres` >> $PGPOOL_DIR/pcp.conf Loading @@ -116,16 +116,17 @@ touch /etc/pgpool-II/pool_passwd chown postgres /etc/pgpool-II/pool_passwd mkdir /var/log/pgpool if [[ "$CATEGORY" == "b" ]]; then chown postgres /var/log/pgpool # Change default PostgreSQL port to 5433 sed -i "s/PGPORT=5432/PGPORT=5433/g" /etc/sysconfig/pgsql/postgresql /etc/init.d/postgresql restart chkconfig pgpool on # Add check status of nodes every minute into cron if ! grep -Fq "pg_auto_attach_node" /etc/crontab; then echo '* * * * * root /usr/local/bin/pg_auto_attach_node' >> /etc/crontab fi /etc/init.d/crond restart fi chkconfig pgpool on