|
|
|
@ -269,15 +269,32 @@ pbzip2 --stdout -p16 -m2000 --keep --decompress /srv/db/postgres-2018-09-23-16-0
|
|
|
|
|
##########
|
|
|
|
|
# Run 4: #
|
|
|
|
|
##########
|
|
|
|
|
# sudo -u postgres dropdb aooncedev2
|
|
|
|
|
# Host pg2
|
|
|
|
|
# sudo -u postgres dropdb ao_odoo
|
|
|
|
|
pbzip2 --stdout -p16 -m2000 --keep --decompress /srv/db/postgres-2018-09-23-16-00.bz2 | psql --quiet --host 10.53.1.81 --user postgres
|
|
|
|
|
pbzip2 --stdout -p16 -m2000 --keep --decompress /srv/db/postgres-2018-09-23-16-00.bz2 | psql --quiet --host 10.53.1.82 --user postgres
|
|
|
|
|
# start: df -h /var/lib/postgresql: 91M
|
|
|
|
|
# end: df -h /var/lib/postgresql: 26G
|
|
|
|
|
# Runtime: 24m2.173s
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##########
|
|
|
|
|
# Run 5: #
|
|
|
|
|
##########
|
|
|
|
|
# Host pg2
|
|
|
|
|
# Setting Changed:
|
|
|
|
|
max_connections = 512
|
|
|
|
|
shared_buffers = 8GB
|
|
|
|
|
work_mem = 27962kB
|
|
|
|
|
maintenance_work_mem = 2GB
|
|
|
|
|
max_wal_size = 8GB
|
|
|
|
|
wal_buffers = 16MB
|
|
|
|
|
effective_cache_size = 16GB
|
|
|
|
|
# sudo -u postgres dropdb ao_odoo
|
|
|
|
|
pbzip2 --stdout -p16 -m2000 --keep --decompress /srv/db/postgres-2018-09-23-16-00.bz2 | psql --quiet --host 10.53.1.82 --user postgres
|
|
|
|
|
# start: df -h /var/lib/postgresql:
|
|
|
|
|
# end: df -h /var/lib/postgresql:
|
|
|
|
|
# Runtime:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##########
|
|
|
|
|
# Run X: #
|
|
|
|
|
##########
|
|
|
|
@ -330,3 +347,34 @@ http://127.0.0.1:58269
|
|
|
|
|
# DDMRP Buffer ADU calculation
|
|
|
|
|
# Reordering Rule DDMRP calculation
|
|
|
|
|
##############################################################################
|
|
|
|
|
##############################################################################
|
|
|
|
|
# pg2, upgrade to Postgres 10
|
|
|
|
|
|
|
|
|
|
apt remove postgresql-9.6 postgresql-client-9.6 postgresql-client-common postgresql-common postgresql-server-dev-9.6 postgresql-server-dev-all
|
|
|
|
|
|
|
|
|
|
# rm -rf /var/lib/postgresql/9.6/
|
|
|
|
|
|
|
|
|
|
echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgdg.list
|
|
|
|
|
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
|
|
|
|
apt update
|
|
|
|
|
apt dist-upgrade
|
|
|
|
|
apt autoremove
|
|
|
|
|
apt install postgresql-10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# XXX edit /etc/postgresql/10/main/postgresql.conf and change to be
|
|
|
|
|
# like this (note single quotes ')
|
|
|
|
|
# ao-pg2
|
|
|
|
|
listen_addresses = '127.0.0.1,10.53.1.82' # what IP address(es) to listen on;
|
|
|
|
|
|
|
|
|
|
cat > /etc/postgresql/10/main/pg_hba.conf <<EOF
|
|
|
|
|
host all all 127.0.0.1/32 md5
|
|
|
|
|
host all odoo 10.53.1.196/32 trust
|
|
|
|
|
host all postgres 10.53.1.196/32 trust
|
|
|
|
|
host aooncedev2 aooncedev2 10.53.1.196/32 trust
|
|
|
|
|
local all all peer
|
|
|
|
|
local all postgres peer
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|