Fix pgpool_setup to not show an error.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 3 May 2021 07:47:24 +0000 (16:47 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 3 May 2021 07:51:26 +0000 (16:51 +0900)
In the streaming replication mode pgpool_setup showed error:
:
:
recovery node 2...pcp_recovery_node -- Command Successful
done.
creating follow primary script
psql: error: server closed the connection unexpectedly
      This probably means the server terminated abnormally
      before or while processing the request.
shutdown all
:
:
While creating followers, pgpool_setup confirmed using
wait_for_pgpool_startup that pgpool comes up online except the last
node. This is unnecessary and it should confirm that pgpool comes up
even in the last node.

src/test/pgpool_setup.in

index 02c00c5abb6e3f33fc7a43c2c2480f5b81f880d7..e2cc910b3b1d2a5d8e881bb902be1242fed5b3c0 100755 (executable)
@@ -935,10 +935,7 @@ export PCPPASSFILE=$PCP_PASS_FILE
                $PGPOOL_INSTALL_DIR/bin/pcp_recovery_node -w -h localhost -p $PCP_PORT -n $n
                echo "done."
                n=`expr $n + 1`
-               if [ $n -lt $NUMCLUSTERS ];then
-                       wait_for_pgpool_startup
-#                      sleep 10
-               fi
+               wait_for_pgpool_startup
        done
 
 #