diff --git a/doc/howto/londiste3_simple_rep_howto.txt b/doc/howto/londiste3_simple_rep_howto.txt index 74db0c97..15796896 100644 --- a/doc/howto/londiste3_simple_rep_howto.txt +++ b/doc/howto/londiste3_simple_rep_howto.txt @@ -25,7 +25,7 @@ It also runs pgbench to test that the replication actually happens and works pro Run the following SQL: ---- -CREATE DATABASE l3simple; +CREATE DATABASE l3simple_primary; ---- === Set up pgbench schema === @@ -36,7 +36,7 @@ populating it with sample data and later running SQL loads to be replicated. Run command : ---- -pgbench -i -s 2 -F 80 l3simple +pgbench -i -s 2 -F 80 l3simple_primary ---- === And add primary and foreign keys needed for replication === @@ -63,26 +63,26 @@ ALTER TABLE pgbench_history ADD CONSTRAINT pgbench_history_accounts_fk FOREIGN K then load it into database: ---- -psql l3simple -f /tmp/prepare_pgbenchdb_for_londiste.sql +psql l3simple_primary -f /tmp/prepare_pgbenchdb_for_londiste.sql ---- -Create and populate target database: +Create and populate slave database: ---- -psql -d postgres -c "CREATE DATABASE l3simple_db2;" -pg_dump -s l3simple_db1 | psql l3simple_db2 +psql -d postgres -c "CREATE DATABASE l3simple_slave;" +pg_dump -s l3simple_primary | psql l3simple_slave ---- Create configuration file st3simple/st3_l3simple_primary.ini ---- [londiste3] -job_name = st3_l3simple_db1 -db = dbname=l3simple_db1 +job_name = st3_l3simple_primary +db = dbname=l3simple_primary queue_name = replika -logfile = st3simple/log/st3_l3simple_db1.log -pidfile = st3simple/pid/st3_l3simple_db1.pid +logfile = st3simple/log/st3_l3simple_primary.log +pidfile = st3simple/pid/st3_l3simple_primary.pid ---- @@ -91,7 +91,7 @@ REMINDER: open trust to the leaf host in pg_hba.conf, or add a user to auth as a Create Londiste root node: ---- -londiste3 st3simple/st3_l3simple_primary.ini create-root node1 "dbname=l3simple host=10.199.59.194" +londiste3 st3simple/st3_l3simple_primary.ini create-root node1 "dbname=l3simple_primary host=127.0.0.1" ---- Run worker daemon for root node: @@ -100,28 +100,28 @@ Run worker daemon for root node: londiste3 -d st3simple/st3_l3simple_primary.ini worker ---- -Create configuration file st3simple/st3_l3simple_leaf.ini +Create configuration file st3simple/st3_l3simple_slave.ini for worker daemon on target node: ---- [londiste3] -job_name = st3_l3simple_leaf -db = dbname=l3simple +job_name = st3_l3simple_slave +db = dbname=l3simple_slave queue_name = replika -logfile = st3simple/log/st3_l3simple_leaf.log -pidfile = st3simple/pid/st3_l3simple_leaf.pid +logfile = st3simple/log/st3_l3simple_slave.log +pidfile = st3simple/pid/st3_l3simple_slave.pid ---- Initialize node in target database: ---- -londiste3 st3simple/st3_l3simple_leaf.ini create-leaf node2 dbname=l3simple --provider="dbname=l3simple host=10.199.59.194" +londiste3 st3simple/st3_l3simple_slave.ini create-leaf node2 dbname=l3simple_slave --provider="dbname=l3simple_primary host=127.0.0.1" ---- Launch worker daemon for target database: ---- -londiste3 -d st3simple/st3_l3simple_leaf.ini worker +londiste3 -d st3simple/st3_l3simple_slave.ini worker ---- Create config file `st3simple/pgqd.ini` for PgQ ticker daemon: @@ -143,7 +143,7 @@ To generate some data traffic on the master database while replicating, run the following command in background: ---- -pgbench -T 120 -c 5 l3simple -f /tmp/throttled.pgbench +pgbench -T 120 -c 5 l3simple_primary -f /tmp/throttled.pgbench ---- The /tmp/throttled.pgbench contains the standard pgbench workload, except that @@ -154,7 +154,7 @@ Now add all the tables to replication, first on root node and then on the leaf: Run command : ---- londiste3 st3simple/st3_l3simple_primary.ini add-table --all -londiste3 st3simple/st3_l3simple_leaf.ini add-table --all +londiste3 st3simple/st3_l3simple_slave.ini add-table --all ---- @@ -166,13 +166,13 @@ The following command will run pgbench full speed with 5 parallel database connections generating database traffic for 10 seconds: ---- -pgbench -T 10 -c 5 l3simple +pgbench -T 10 -c 5 l3simple_primary ---- After this is done, you can check that the tables on both sides have the same data: ---- -londiste3 st3simple/st3_l3simple_leaf.ini compare +londiste3 st3simple/st3_l3simple_slave.ini compare ---- Compare command will establish the same logical point in time on provider and