Database Reference
In-Depth Information
14. Then you should wait for all Foreign Keys to be re-added onto the subscriber tables by
monitoring using the following query run on the subscriber:
SELECT count(*) FROM londiste.subscriber_pending_fkeys;
That covers how to set up selective replication with Londiste.
If you want all tables in one replication set, you should set up scripts to perform the preceding
steps for all tables:
1. Follow steps 1 to 6, and 10 as described in the preceding sequence.
2. Define a replication set on Provider node as follows:
londiste.py clustname_londiste.ini provider add table1
londiste.py clustname_londiste.ini provider add table2
...
londiste.py clustname_londiste.ini provider add tableN
3. Copy the replicated objects to the subscriber node. On the Provider node, run the
following:
pg_dump --schema-only > clustname_schema.sql
4. On the Subscriber node, run the following:
psql -f clustname_schema.sql
5. If you have additional changes on the subscriber, add them now by using the
following:
psql -f clustname_subscriber_changes.sql
6. Subscribe: on the subscriber node, run the following:
londiste.py clustname_londiste.ini subscriber add table1
londiste.py clustname_londiste.ini subscriber add table2
...
londiste.py clustname_londiste.ini subscriber add tableN
How it works...
All related tables that form one replication set must use a single queue. There's no problem
in having multiple queues and multiple Londiste daemons connecting the same provider/
subscribers, though obviously that is a more complex configuration, and seldom necessary,
unless performance is a significant issue. Each provider database needs only one pgqadm as
all that provides is the ticker .
When adding tables without explicit schema, Londiste assumes the schema public .
Londiste does not use a search path. If you want another schema, you'll need to fully qualify
tablenames like the following:
schemaname.tablename
 
Search WWH ::




Custom Search