pgpool2.git / summary / log / commit / refs

commit    3a9cdd598825cada11472a463c8317199fa72580
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Sun Jul 28 02:11:07 2019 +0000

    Fix pgpool_setup to produce correct follow master command.
    
    The produced script incorrectly checked whether PostgreSQL is running
    or not, which resulted in that it mistakenly thought PostgreSQL is
    always running.


src/test/pgpool_setup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/pgpool_setup b/src/test/pgpool_setup index 8f362928c..27ca30e22 100755 --- a/src/test/pgpool_setup +++ b/src/test/pgpool_setup @@ -216,7 +216,8 @@ date >> $log echo "failed_node_id $failed_node_id failed_host_name $failed_host_name failed_port $failed_port failed_db_cluster $failed_db_cluster new_master_id $new_master_id old_master_id $old_master_id new_master_host_name $new_master_host_name old_primary_node_id $old_primary_node_id new_master_port_number $new_master_port_number new_master_db_cluster $new_master_db_cluster" >> $log # Stop standby node if it's running -if $pg_ctl -D $failed_db_cluster status|grep "is running" >/dev/null 2>&1 +$pg_ctl -D $failed_db_cluster status >/dev/null 2>&1 +if [ $? = 0 ] then $pg_ctl -w -m f -D $failed_db_cluster stop >> $log 2>&1 sleep 10 [parent: bbfe3adb24c0]