Database Reference
In-Depth Information
Test connection to provider and subscriber as mentioned in the clustname_
londiste.ini file for provider_db and subscriber_db .
4. Create the database infrastructure. Run all the following on Provider node:
pgqadm.py clustname_ticker.ini install
londiste.py clustname_londiste.ini provider install
londiste.py clustname_londiste.ini subscriber install
5. Start ticker daemon on Provider node by running the following:
pgqadm.py clustname_ticker.ini ticker -d
6. Start Londiste daemon on Subscriber node as follows:
londiste.py clustname_londiste.ini replay -d
7. Define a replication set on Provider node. For a replication set consisting of tables a ,
b , and c use the following:
londiste.py clustname_londiste.ini provider add a b c
8. Copy the replicated objects to the subscriber node. The definitions need to be the
same, though indexes and Foreign Keys may differ. If you want to make changes on
the Subscriber side, produce a manual script of additional changes. On the Provider
node, run the following:
pg_dump --schema-only -t a -t b -t c > clustname_schema.sql
9. On the Subscriber node, run the following:
psql -f clustname_schema.sql
10. If you have additional changes on the subscriber, add them now. An example might
be that the subscriber can have a completely different set of indexes to the provider,
allowing it to support different kinds of workloads:
psql -f clustname_subscriber_changes.sql
11. Subscribe: on subscriber node, run the following:
londiste.py clustname_londiste.ini subscriber add a b c
12. That's it, your done. Londiste will eventually catch up. If you really want to know
exactly when, then you can watch
londiste.py clustname_londiste.ini subscriber tables
13. until all tables show as «OK». Or run the following on the provider:
SELECT * FROM pgq.get_consumer_info();
 
Search WWH ::




Custom Search