|
|
@ -26,6 +26,30 @@ pgxl-coord-1
|
|
|
|
pgxl-coord-2
|
|
|
|
pgxl-coord-2
|
|
|
|
pgxl-coord-3
|
|
|
|
pgxl-coord-3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Open Up firewall.
|
|
|
|
|
|
|
|
Open up firewall ports for postgres and others. All TCP (?).
|
|
|
|
|
|
|
|
Postgres: 5432
|
|
|
|
|
|
|
|
GTM: 20001-20003
|
|
|
|
|
|
|
|
Coordinator: 30001-30003, 31001-31003
|
|
|
|
|
|
|
|
Data Node: 40001-40003, 41001-41003
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 5432 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 20001 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 20002 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 20003 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 30001 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 30002 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 30003 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 31001 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 31002 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 31003 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 40001 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 40002 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 40003 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 41001 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 41002 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 41003 -j ACCEPT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set up SSH between hosts
|
|
|
|
# Set up SSH between hosts
|
|
|
|
|
|
|
|
|
|
|
@ -119,23 +143,32 @@ add datanode master name host port pooler dir waldir extraServerConf
|
|
|
|
add datanode slave name host port pooler dir waldir archDir
|
|
|
|
add datanode slave name host port pooler dir waldir archDir
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XLDIR=/usr/local/pgsql
|
|
|
|
XLDIR=/usr/local/pgsql
|
|
|
|
export XLDIR
|
|
|
|
export XLDIR
|
|
|
|
pgxc_ctl prepare config empty
|
|
|
|
pgxc_ctl prepare config empty
|
|
|
|
|
|
|
|
|
|
|
|
pgxc_ctl add gtm master gtm_1 pg-pgxl-gtm-1 20001 "$XLDIR/gtm"
|
|
|
|
===============================
|
|
|
|
XXX slave or proxy?
|
|
|
|
vim pgxc_ctl/pgxc_ctl.conf
|
|
|
|
XXX pgxc_ctl add gtm slave gtm_2 pg-pgxl-gtm-2 20001 "$XLDIR/gtm"
|
|
|
|
Comment out:
|
|
|
|
XXX pgxc_ctl add gtm_proxy gtm_2 pg-pgxl-gtm-2 20001 "$XLDIR/gtm"
|
|
|
|
coordPgHbaEntries=(::1/128)
|
|
|
|
|
|
|
|
datanodePgHbaEntries=(::1/128)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Enable/extend:
|
|
|
|
|
|
|
|
coordPgHbaEntries=(127.0.0.1/32 10.53.1.0/24)
|
|
|
|
|
|
|
|
datanodePgHbaEntries=(127.0.0.1/32 10.53.1.0/24)
|
|
|
|
|
|
|
|
===============================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XXX Set up slaves/proxies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pgxc_ctl add gtm master gtm_1 pg-pgxl-gtm-1 20001 "$XLDIR/gtm-1"
|
|
|
|
|
|
|
|
XXX pgxc_ctl add gtm slave gtm_2 pg-pgxl-gtm-2 20002 "$XLDIR/gtm-2"
|
|
|
|
|
|
|
|
XXX pgxc_ctl add gtm_proxy gtm_2 pg-pgxl-gtm-2 20003 "$XLDIR/gtm-3"
|
|
|
|
|
|
|
|
|
|
|
|
pgxc_ctl add coordinator master coord_1 pg-pgxl-coord-1 30001 31001 "$XLDIR/coord-1" none none
|
|
|
|
pgxc_ctl add coordinator master coord_1 pg-pgxl-coord-1 30001 31001 "$XLDIR/coord-1" none none
|
|
|
|
XXX master or slaves?
|
|
|
|
|
|
|
|
pgxc_ctl add coordinator master coord_2 pg-pgxl-coord-2 30001 31001 "$XLDIR/coord-2" none none
|
|
|
|
pgxc_ctl add coordinator master coord_2 pg-pgxl-coord-2 30001 31001 "$XLDIR/coord-2" none none
|
|
|
|
pgxc_ctl add coordinator master coord_3 pg-pgxl-coord-3 30001 31001 "$XLDIR/coord-3" none none
|
|
|
|
pgxc_ctl add coordinator master coord_3 pg-pgxl-coord-3 30001 31001 "$XLDIR/coord-3" none none
|
|
|
|
|
|
|
|
|
|
|
|
pgxc_ctl add datanode master datanode_1 pg-pgxl1 40001 41001 "$XLDIR/data-1" none none none
|
|
|
|
pgxc_ctl add datanode master datanode_1 pg-pgxl1 40001 41001 "$XLDIR/data-1" none none none
|
|
|
|
XXX master or slaves?
|
|
|
|
|
|
|
|
pgxc_ctl add datanode master datanode_2 pg-pgxl2 40001 41001 "$XLDIR/data-2" none none none
|
|
|
|
pgxc_ctl add datanode master datanode_2 pg-pgxl2 40001 41001 "$XLDIR/data-2" none none none
|
|
|
|
pgxc_ctl add datanode master datanode_3 pg-pgxl3 40001 41001 "$XLDIR/data-3" none none none
|
|
|
|
pgxc_ctl add datanode master datanode_3 pg-pgxl3 40001 41001 "$XLDIR/data-3" none none none
|
|
|
|
pgxc_ctl add datanode master datanode_4 pg-pgxl4 40001 41001 "$XLDIR/data-4" none none none
|
|
|
|
pgxc_ctl add datanode master datanode_4 pg-pgxl4 40001 41001 "$XLDIR/data-4" none none none
|
|
|
@ -143,41 +176,15 @@ pgxc_ctl add datanode master datanode_5 pg-pgxl5 40001 41001 "$XLDIR/data-5" non
|
|
|
|
pgxc_ctl monitor all createdb -p 30001 test
|
|
|
|
pgxc_ctl monitor all createdb -p 30001 test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Open Up firewall.
|
|
|
|
# Create database
|
|
|
|
Open up firewall ports for postgres and others. All TCP (?).
|
|
|
|
ssh pgxl-coord-1
|
|
|
|
Postgres: 5432
|
|
|
|
sudo su - postgres
|
|
|
|
GTM: 20001
|
|
|
|
psql -p 30001
|
|
|
|
Coordinator: 30001
|
|
|
|
create database foo;
|
|
|
|
Data Node: 40001
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 5432 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 20001 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 30001 -j ACCEPT
|
|
|
|
|
|
|
|
-A INPUT -p tcp --dest 10.53.1.0/24 --dport 40001 -j ACCEPT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# OmniDB
|
|
|
|
|
|
|
|
wget https://omnidb.org/dist/2.12.0/omnidb-server_2.12.0-debian-amd64.deb
|
|
|
|
|
|
|
|
dpkg -i omnidb-server_2.12.0-debian-amd64.deb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Open firewall port 8000 and 25482
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This file isn't used: /opt/omnidb-server/omnidb.conf
|
|
|
|
|
|
|
|
In the pre-packaged .deb, it runs as root... Config is here:
|
|
|
|
|
|
|
|
/root/.omnidb/omnidb-server/omnidb.conf
|
|
|
|
|
|
|
|
listening_address = 0.0.0.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add Postgres-XL plugin:
|
|
|
|
|
|
|
|
wget https://omnidb.org/dist/plugins/omnidb-xl_1.0.0.zip
|
|
|
|
|
|
|
|
unzip omnidb-xl_1.0.0.zip
|
|
|
|
|
|
|
|
sudo cp -r plugins/ static/ /opt/omnidb-server/OmniDB_app/
|
|
|
|
|
|
|
|
sudo systemctl restart omnidb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Log in with admin/admin and set up users/pass.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Notes
|
|
|
|
# Check it replicated:
|
|
|
|
Maybe add build dependency python3-dev (?) for PL/Python shared library.
|
|
|
|
ssh pgxl1
|
|
|
|
Maybe gettext.
|
|
|
|
sudo su - postgres
|
|
|
|
Maybe OpenSSL.
|
|
|
|
psql -p 40001
|
|
|
|
XXX change prefix ?
|
|
|
|
\l
|
|
|
|
|
|
|
|
|
|
|
|