jim-mlodgenski / bdr Goto Github PK
View Code? Open in Web Editor NEWThis project forked from keenser/bdr
bdr pg 11
This project forked from keenser/bdr
bdr pg 11
See http://2ndquadrant.com/BDR and http://bdr-project.org/docs/ for documentation on the installation and use of BDR. BDR2 with postgresql 11 patches See INSTALL.src for compile from source. Install pkg: Add https://github.com/keenser/repo repo: ``` sudo apt-key adv --fetch-keys https://raw.githubusercontent.com/keenser/repo/master/PUBLIC.KEY echo 'deb http://keenser.github.io/repo stretch main' | sudo tee -a /etc/apt/sources.list.d/keenser.list sudo apt update sudo apt install postgresql-11 postgresql-11-bdr-pluglin ``` Sample usage: ``` #backup database before cluster drop if exists: /usr/lib/postgresql/11/bin/bdr_dump -p 5434 -N bdr radius > backup.sql pg_dropcluster 11 node1 --stop pg_dropcluster 11 node2 --stop rm -r /etc/postgresql/11/node1/conf.d/ rm -r /etc/postgresql/11/node2/conf.d/ pg_createcluster 11 node1 pg_createcluster 11 node2 pg_ctlcluster 11 node1 start pg_ctlcluster 11 node2 start psql -p 5434 -c 'create database radius' psql -p 5435 -c 'create database radius' cat <<EOF | tee /etc/postgresql/11/node1/conf.d/bdr.conf /etc/postgresql/11/node2/conf.d/bdr.conf shared_preload_libraries = 'bdr' bdr.trace_replay = on wal_level = 'logical' track_commit_timestamp = on max_replication_slots = 20 max_wal_senders = 10 EOF pg_ctlcluster 11 node1 restart pg_ctlcluster 11 node2 restart psql -p 5434 radius -c 'create extension bdr cascade' -c "SELECT bdr.bdr_group_create(local_node_name := 'node1', node_external_dsn := 'dbname=radius port=5434')" -c 'select bdr.bdr_node_join_wait_for_ready()' psql -p 5435 radius -c 'create extension bdr cascade' -c "SELECT bdr.bdr_group_join(local_node_name := 'node2', node_external_dsn := 'dbname=radius port=5435', join_using_dsn := 'dbname=radius port=5434')" -c 'select bdr.bdr_node_join_wait_for_ready()' #restore if any backup psql -p 5434 radius -1 -f backup.sql psql -p 5434 radius -c "CREATE TABLE IF NOT EXISTS test (id bigserial, name text)" -c "ALTER TABLE test ALTER COLUMN id SET DEFAULT bdr.global_seq_nextval('test_id_seq'::regclass)" psql -p 5434 radius -c "insert into test(name) values('foo')" psql -p 5435 radius -c "insert into test(name) values('bar')" psql -p 5434 radius -c 'select count(*) from test' psql -p 5435 radius -c 'select count(*) from test' ```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.