# System CentOS Linux release 7.7.1908 (Core) $ yum list installed | grep 'postgres\|pgpool' Failed to set locale, defaulting to C pgpool-II-12.x86_64 4.1.0-1.rhel7 @pgdg12 postgresql-libs.x86_64 9.2.24-1.el7_5 @base postgresql12.x86_64 12.1-2PGDG.rhel7 @pgdg12 postgresql12-libs.x86_64 12.1-2PGDG.rhel7 @pgdg12 postgresql12-server.x86_64 12.1-2PGDG.rhel7 @pgdg12 Starting of from https://www.pgpool.net/docs/latest/en/html/tutorial-replication.html # Steps 1) under /etc/pgpool-II-12 $ cp pgpool.conf.sample-stream pgpool.conf 2) Run pgpool_setup $ /usr/pgpool-12/bin/pgpool_setup /usr/pgpool-12/bin/pgpool_setup: line 102: /usr/local/pgsql/bin/initdb: No such file or directory expr: syntax error expr: syntax error PostgreSQL major version: /usr/pgpool-12/bin/pgpool_setup: line 125: [: -gt: unary operator expected Starting set up in streaming replication mode cp: cannot stat '/usr/local/etc/pgpool.conf.sample-stream': No such file or directory cp: cannot stat '/usr/local/etc/pool_hba.conf.sample': No such file or directory creating startall and shutdownall creating failover script creating database cluster /home/sjoerd/test/data0...done. update postgresql.conf creating pgpool_remote_start creating basebackup.sh creating recovery.conf creating database cluster /home/sjoerd/test/data1...done. update postgresql.conf creating pgpool_remote_start creating basebackup.sh creating recovery.conf sed: can't read /home/sjoerd/test/etc/pool_hba.conf: No such file or directory sed: can't read /home/sjoerd/test/etc/pool_hba.conf: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 640: [: -ge: unary operator expected /usr/pgpool-12/bin/pgpool_setup: line 953: /usr/local/bin/pg_md5: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 956: /usr/local/bin/pg_md5: No such file or directory temporarily start data0 cluster to create extensions temporarily start pgpool-II to create standby nodes /usr/pgpool-12/bin/pgpool_setup: line 1017: /usr/local/bin/pgpool: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 722: /usr/local/pgsql/bin/psql: No such file or directory /usr/pgpool-12/bin/pgpool_setup: line 1021: /usr/local/pgsql/bin/psql: No such file or directory recovery node 1.../usr/pgpool-12/bin/pgpool_setup: line 1028: /usr/local/bin/pcp_recovery_node: No such file or directory done. creating follow master script /usr/pgpool-12/bin/pgpool_setup: line 1104: /usr/local/pgsql/bin/psql: No such file or directory shutdown all pgpool-II setting for streaming replication mode is done. To start the whole system, use /home/sjoerd/test/startall. To shutdown the whole system, use /home/sjoerd/test/shutdownall. pcp command user name is "sjoerd", password is "sjoerd". Each PostgreSQL, pgpool-II and pcp port is as follows: #1 port is 11002 #2 port is 11003 pgpool port is 11000 pcp port is 11001 The info above is in README.port. $ 3) Seems to be looking in the wrong places for this distribution $ sudo find / -name initdb /usr/pgsql-12/bin/initdb 4) Setting some variables export PGBIN=/usr/pgsql-12/bin export PGLIB=/usr/pgsql-12/lib export PGPOOLDIR=/etc/pgpool-II-12 export PGPOOL_INSTALL_DIR=/usr/pgpool-12 5) clean out directory and try again $ rm -r ./* $ /usr/pgpool-12/bin/pgpool_setup PostgreSQL major version: 121 Starting set up in streaming replication mode creating startall and shutdownall creating failover script creating database cluster /home/sjoerd/test/data0...done. update postgresql.conf creating pgpool_remote_start creating basebackup.sh creating recovery.conf creating database cluster /home/sjoerd/test/data1...done. update postgresql.conf creating pgpool_remote_start creating basebackup.sh creating recovery.conf temporarily start data0 cluster to create extensions temporarily start pgpool-II to create standby nodes psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? recovery node 1...ERROR: executing recovery, execution of command failed at "1st stage" DETAIL: command:"basebackup.sh" done. creating follow master script psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.11000"? shutdown all pgpool-II setting for streaming replication mode is done. To start the whole system, use /home/sjoerd/test/startall. To shutdown the whole system, use /home/sjoerd/test/shutdownall. pcp command user name is "sjoerd", password is "sjoerd". Each PostgreSQL, pgpool-II and pcp port is as follows: #1 port is 11002 #2 port is 11003 pgpool port is 11000 pcp port is 11001 The info above is in README.port. $ 6) add PGSOCKET_DIR to psql commands $ diff ~/pgpool_setup.orginal /usr/pgpool-12/bin/pgpool_setup 99c99 < PSQL=$PGBIN/psql --- > PSQL="$PGBIN/psql -h $PGSOCKET_DIR" 431c431 < $psql -p $PORT -c "SELECT pg_start_backup('Streaming Replication', true)" postgres --- > $psql -h $PGSOCKET_DIR -p $PORT -c "SELECT pg_start_backup('Streaming Replication', true)" postgres 451c451 < $psql -p $PORT -c "SELECT * FROM pg_create_physical_replication_slot('pgpool_setup_slot$recovery_node')" postgres --- > $psql -h $PGSOCKET_DIR -p $PORT -c "SELECT * FROM pg_create_physical_replication_slot('pgpool_setup_slot$recovery_node')" postgres 486c486 < $psql -p $PORT -c "SELECT pg_stop_backup()" postgres --- > $psql -h $PGSOCKET_DIR -p $PORT -c "SELECT pg_stop_backup()" postgres 525c525 < $psql -p $PORT -c "SELECT pg_start_backup('Native Replication', true)" postgres --- > $psql -h $PGSOCKET_DIR -p $PORT -c "SELECT pg_start_backup('Native Replication', true)" postgres 543c543 < $psql -p $PORT -c "SELECT pg_stop_backup()" postgres --- > $psql -h $PGSOCKET_DIR -p $PORT -c "SELECT pg_stop_backup()" postgres 579c579 < $psql -q -p $PORT -t -c 'SELECT datname FROM pg_database WHERE NOT datistemplate AND datallowconn' template1| --- > $psql -h $PGSOCKET_DIR -q -p $PORT -t -c 'SELECT datname FROM pg_database WHERE NOT datistemplate AND datallowconn' template1| 583c583 < $psql -p $PORT -c "SELECT setval(oid, nextval(oid)) FROM pg_class WHERE relkind = 'S'" $i --- > $psql -h $PGSOCKET_DIR -p $PORT -c "SELECT setval(oid, nextval(oid)) FROM pg_class WHERE relkind = 'S'" $i 587c587 < $psql -p $PORT -c "SELECT pgpool_switch_xlog('__ARCHDIR__')" template1 --- > $psql -h $PGSOCKET_DIR -p $PORT -c "SELECT pgpool_switch_xlog('__ARCHDIR__')" template1 7) clean out directory and try again $ rm -r ./* $ /usr/pgpool-12/bin/pgpool_setup PostgreSQL major version: 121 Starting set up in streaming replication mode creating startall and shutdownall creating failover script creating database cluster /home/sjoerd/test/data0...done. update postgresql.conf creating pgpool_remote_start creating basebackup.sh creating recovery.conf creating database cluster /home/sjoerd/test/data1...done. update postgresql.conf creating pgpool_remote_start creating basebackup.sh creating recovery.conf temporarily start data0 cluster to create extensions temporarily start pgpool-II to create standby nodes node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_s tate | last_status_change ---------+----------+-------+--------+-----------+---------+------------+-------------------+-------------------+-------------------+------------------- -----+--------------------- 0 | /tmp | 11002 | up | 0.500000 | primary | 0 | true | 0 | | | 2019-12-31 11:22:43 1 | /tmp | 11003 | down | 0.500000 | standby | 0 | false | 0 | | | 1970-01-01 00:00:00 (2 rows) recovery node 1...ERROR: executing recovery, execution of command failed at "1st stage" DETAIL: command:"basebackup.sh" done. creating follow master script node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change ---------+----------+-------+--------+-----------+---------+------------+-------------------+-------------------+-------------------+------------------------+--------------------- 0 | /tmp | 11002 | up | 0.500000 | primary | 0 | true | 0 | | | 2019-12-31 11:22:43 1 | /tmp | 11003 | down | 0.500000 | standby | 0 | false | 0 | | | 1970-01-01 00:00:00 (2 rows) shutdown all pgpool-II setting for streaming replication mode is done. To start the whole system, use /home/sjoerd/test/startall. To shutdown the whole system, use /home/sjoerd/test/shutdownall. pcp command user name is "sjoerd", password is "sjoerd". Each PostgreSQL, pgpool-II and pcp port is as follows: #1 port is 11002 #2 port is 11003 pgpool port is 11000 pcp port is 11001 The info above is in README.port. 8) Looking good, starting the whole system $ ./startall ./startall: /usr/share/bashdb/bashdb-main.inc: No such file or directory ./startall: warning: cannot start debugger; debugging mode disabled waiting for server to start....7128 2019-12-31 11:24:24 GMT LOG: starting PostgreSQL 12.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit 7128 2019-12-31 11:24:24 GMT LOG: listening on IPv4 address "0.0.0.0", port 11002 7128 2019-12-31 11:24:24 GMT LOG: listening on IPv6 address "::", port 11002 7128 2019-12-31 11:24:24 GMT LOG: listening on Unix socket "/tmp/.s.PGSQL.11002" 7128 2019-12-31 11:24:24 GMT LOG: redirecting log output to logging collector process 7128 2019-12-31 11:24:24 GMT HINT: Future log output will appear in directory "log". done server started waiting for server to start....7140 2019-12-31 11:24:24 GMT LOG: starting PostgreSQL 12.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit 7140 2019-12-31 11:24:24 GMT LOG: listening on IPv4 address "0.0.0.0", port 11003 7140 2019-12-31 11:24:24 GMT LOG: listening on IPv6 address "::", port 11003 7140 2019-12-31 11:24:24 GMT LOG: listening on Unix socket "/tmp/.s.PGSQL.11003" 7140 2019-12-31 11:24:24 GMT LOG: redirecting log output to logging collector process 7140 2019-12-31 11:24:24 GMT HINT: Future log output will appear in directory "log". done server started $ 9) Running the first test (with added reference to socket directory) $ psql -h /tmp -p 11000 -c "show pool_nodes" test psql: error: could not connect to server: ERROR: unable to read message kind DETAIL: kind does not match between master(53) slot[1] (45) 10) Making more changes to get the scripts to pick up the pg socket directory: $ diff ~/pgpool_setup.20191230 /usr/pgpool-12/bin/pgpool_setup 389a390 > PGSOCKET_DIR=__PGSOCKET_DIR__ 500a502 > -e "/__PGSOCKET_DIR__/s@__PGSOCKET_DIR__@$PGSOCKET_DIR@" \ 516a519 > PGSOCKET_DIR=__PGSOCKET_DIR__ 553a557 > -e "/__PGSOCKET_DIR__/s@__PGSOCKET_DIR__@$PGSOCKET_DIR@" \ 569a574 > PGSOCKET_DIR=__PGSOCKET_DIR__ 596a602 > -e "/__PGSOCKET_DIR__/s@__PGSOCKET_DIR__@$PGSOCKET_DIR@" \ 11) cleaning out the directory and try again $ rm -r ./* $ /usr/pgpool-12/bin/pgpool_setup PostgreSQL major version: 121 Starting set up in streaming replication mode creating startall and shutdownall creating failover script creating database cluster /home/sjoerd/test/data0...done. update postgresql.conf creating pgpool_remote_start creating basebackup.sh creating recovery.conf creating database cluster /home/sjoerd/test/data1...done. update postgresql.conf creating pgpool_remote_start creating basebackup.sh creating recovery.conf temporarily start data0 cluster to create extensions temporarily start pgpool-II to create standby nodes node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_s tate | last_status_change ---------+----------+-------+--------+-----------+---------+------------+-------------------+-------------------+-------------------+------------------- -----+--------------------- 0 | /tmp | 11002 | up | 0.500000 | primary | 0 | true | 0 | | | 2019-12-31 12:10:59 1 | /tmp | 11003 | down | 0.500000 | standby | 0 | false | 0 | | | 1970-01-01 00:00:00 (2 rows) recovery node 1...ERROR: executing recovery, execution of command failed at "1st stage" DETAIL: command:"basebackup.sh" done. creating follow master script node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change ---------+----------+-------+--------+-----------+---------+------------+-------------------+-------------------+-------------------+------------------------+--------------------- 0 | /tmp | 11002 | up | 0.500000 | primary | 0 | true | 0 | | | 2019-12-31 12:10:59 1 | /tmp | 11003 | down | 0.500000 | standby | 0 | false | 0 | | | 1970-01-01 00:00:00 (2 rows) shutdown all pgpool-II setting for streaming replication mode is done. To start the whole system, use /home/sjoerd/test/startall. To shutdown the whole system, use /home/sjoerd/test/shutdownall. pcp command user name is "sjoerd", password is "sjoerd". Each PostgreSQL, pgpool-II and pcp port is as follows: #1 port is 11002 #2 port is 11003 pgpool port is 11000 pcp port is 11001 The info above is in README.port. 12) Found another error in pgpool_setup.log /usr/pgpool-12/bin/pgpool_setup: line 368: ed: command not found Trying: 368c368 < sed $1/pg_hba.conf < ed $1/pg_hba.conf < Running transaction check ---> Package pgpool-II-12-extensions.x86_64 0:4.1.0-1.rhel7 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================== Installing: pgpool-II-12-extensions x86_64 4.1.0-1.rhel7 pgdg12 19 k Transaction Summary ======================================================================================================================================================== Install 1 Package Total download size: 19 k Installed size: 60 k Is this ok [y/d/N]: y Downloading packages: pgpool-II-12-extensions-4.1.0-1.rhel7.x86_64.rpm | 19 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : pgpool-II-12-extensions-4.1.0-1.rhel7.x86_64 1/1 Verifying : pgpool-II-12-extensions-4.1.0-1.rhel7.x86_64 1/1 Installed: pgpool-II-12-extensions.x86_64 0:4.1.0-1.rhel7 Complete! $ ls -al /usr/pgsql-12/share/extension/ total 84 drwxr-xr-x. 2 root root 4096 Dec 31 12:30 . drwxr-xr-x. 7 root root 4096 Dec 19 13:22 .. -rw-r--r--. 1 root root 557 Nov 1 17:13 pgpool-recovery.sql -rw-r--r--. 1 root root 142 Nov 1 17:13 pgpool-regclass.sql -rw-r--r--. 1 root root 798 Nov 1 17:13 pgpool_adm--1.0--1.1.sql -rw-r--r--. 1 root root 2574 Nov 1 17:13 pgpool_adm--1.0.sql -rw-r--r--. 1 root root 819 Nov 1 17:13 pgpool_adm--1.1--1.2.sql -rw-r--r--. 1 root root 2653 Nov 1 17:13 pgpool_adm--1.1.sql -rw-r--r--. 1 root root 2714 Nov 1 17:13 pgpool_adm--1.2.sql -rw-r--r--. 1 root root 146 Nov 1 17:13 pgpool_adm.control -rw-r--r--. 1 root root 429 Nov 1 17:13 pgpool_recovery--1.1--1.2.sql -rw-r--r--. 1 root root 1002 Nov 1 17:13 pgpool_recovery--1.1.sql -rw-r--r--. 1 root root 447 Nov 1 17:13 pgpool_recovery--1.2--1.3.sql -rw-r--r--. 1 root root 1243 Nov 1 17:13 pgpool_recovery--1.2.sql -rw-r--r--. 1 root root 1508 Nov 1 17:13 pgpool_recovery--1.3.sql -rw-r--r--. 1 root root 178 Nov 1 17:13 pgpool_recovery.control -rw-r--r--. 1 root root 283 Nov 1 17:13 pgpool_regclass--1.0.sql -rw-r--r--. 1 root root 152 Nov 1 17:13 pgpool_regclass.control -rw-r--r--. 1 root root 310 Nov 30 13:31 plpgsql--1.0.sql -rw-r--r--. 1 root root 370 Nov 30 13:31 plpgsql--unpackaged--1.0.sql -rw-r--r--. 1 root root 179 Nov 30 13:31 plpgsql.control 14) Trying again. $ /usr/pgpool-12/bin/pgpool_setup PostgreSQL major version: 121 Starting set up in streaming replication mode creating startall and shutdownall creating failover script creating database cluster /home/sjoerd/test/data0...done. update postgresql.conf creating pgpool_remote_start creating basebackup.sh creating recovery.conf creating database cluster /home/sjoerd/test/data1...done. update postgresql.conf creating pgpool_remote_start creating basebackup.sh creating recovery.conf temporarily start data0 cluster to create extensions temporarily start pgpool-II to create standby nodes node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_n ode | replication_delay | replication_state | replication_sync_state | last_status_chang e ---------+----------+-------+--------+-----------+---------+------------+--------------- ----+-------------------+-------------------+------------------------+------------------ --- 0 | /tmp | 11002 | up | 0.500000 | primary | 0 | true | 0 | | | 2019-12-31 13:40: 38 1 | /tmp | 11003 | down | 0.500000 | standby | 0 | false | 0 | | | 1970-01-01 00:00: 00 (2 rows) recovery node 1...ERROR: recovery is checking if postmaster is started DETAIL: postmaster on hostname:"/tmp" database:"template1" user:"sjoerd" failed to start in 90 second done. creating follow master script node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change ---------+----------+-------+--------+-----------+---------+------------+-------------------+-------------------+-------------------+------------------------+--------------------- 0 | /tmp | 11002 | up | 0.500000 | primary | 0 | true | 0 | | | 2019-12-31 13:40:38 1 | /tmp | 11003 | down | 0.500000 | standby | 0 | false | 0 | | | 1970-01-01 00:00:00 (2 rows) shutdown all pgpool-II setting for streaming replication mode is done. To start the whole system, use /home/sjoerd/test/startall. To shutdown the whole system, use /home/sjoerd/test/shutdownall. pcp command user name is "sjoerd", password is "sjoerd". Each PostgreSQL, pgpool-II and pcp port is as follows: #1 port is 11002 #2 port is 11003 pgpool port is 11000 pcp port is 11001 The info above is in README.port. 15) No errors in pgpool_setup $ cat pgpool_setup.log The files belonging to this database system will be owned by user "sjoerd". This user must also own the server process. The database cluster will be initialized with locale "C". The default text search configuration will be set to "english". Data page checksums are enabled. creating directory /home/sjoerd/test/data0 ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Etc/GMT creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: /usr/pgsql-12/bin/pg_ctl -D /home/sjoerd/test/data0 -l logfile start The files belonging to this database system will be owned by user "sjoerd". This user must also own the server process. The database cluster will be initialized with locale "C". The default text search configuration will be set to "english". Data page checksums are enabled. creating directory /home/sjoerd/test/data1 ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Etc/GMT creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: /usr/pgsql-12/bin/pg_ctl -D /home/sjoerd/test/data1 -l logfile start waiting for server to start....2467 2019-12-31 13:40:36 GMT LOG: starting PostgreSQL 12.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit 2467 2019-12-31 13:40:36 GMT LOG: listening on IPv4 address "0.0.0.0", port 11002 2467 2019-12-31 13:40:36 GMT LOG: listening on IPv6 address "::", port 11002 2467 2019-12-31 13:40:36 GMT LOG: listening on Unix socket "/tmp/.s.PGSQL.11002" 2467 2019-12-31 13:40:37 GMT LOG: redirecting log output to logging collector process 2467 2019-12-31 13:40:37 GMT HINT: Future log output will appear in directory "log". done server started CREATE EXTENSION CREATE EXTENSION CREATE DATABASE 2019-12-31 13:42:25: pid 2628: LOG: stop request sent to pgpool. waiting for termination... .done. waiting for server to shut down.... done server stopped pg_ctl: PID file "/home/sjoerd/test/data1/postmaster.pid" does not exist Is server running?