Revision [19430]
This is an old revision of PostgresStreamingNotes made by MikeShultz on 2017-04-17 16:41:16.
Notes on Streaming Test
https://www.postgresql.org/docs/9.6/static/high-availability.html
Setup
Install
rpm -i https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -i https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm yum install htop pg_activity mlocate bash-completion bash-completion-extras yum install postgresql96.x86_64 postgresql96-contrib.x86_64 postgresql96-devel.x86_64 postgresql96-libs.x86_64 postgresql96-server.x86_64 yum install postgis2_96 postgis2_96-utils postgis2_96-client
PostgreSQL Setup
Initialize the DB and get our schema and data into the new primary server.
# initialize on-disk DB /usr/pgsql-9.6/bin/postgresql96-setup initdb # Get roles pg_dumpall -r --file=./pg_roles.sql -h db0.cloud.votesmart.org -U mike -l pvsadmin # Get schema pg_dump -s -d pvsadmin -n public -n pyadmin -n django -n whitefront -h db0.cloud.votesmart.org -U mike -f pvsadmin_schema-20170417.sql # On the new database server, create the DB and extensions necessary psql -c 'CREATE DATABASE pvsadmin' postgres psql -c 'CREATE EXTENSION postgis' pvsadmin # Import roles psql -1f pg_roles.sql # Import schema
CategoryITMisc