[EMAIL PROTECTED] wrote:
Hi,
I got executing the script;

(creates table on master,slave1,slave2 but
does it matter to have connection to only node1 or all nodes in script,
it did the same thing with connection to only node1 and I tried to connection
to
all nodes ?
node 1 admin conninfo = 'dbname=development host=192.168.15.90 port=5444
user=enterprisedb';
node 2 admin conninfo = 'dbname=development host=192.168.15.91 port=5444
user=enterprisedb';
node 3 admin conninfo = 'dbname=development host=192.168.15.92 port=5444
user=enterprisedb';
)

(once the table cretaed, I would expect to have replication for all tables and
new-created table;
meaning once I do insertion to new-created table on master, I was expecting to
replicate on slave1 and slave2,
but it did not replicate/insert to slave1 and slave2. I am sure I am missing
something?)

(I believe same things needs to be done for other SQL commands, like inserting
INDEXs,FUNCTIONS, etc.)
  
See the "Task-oriented" documentation at
<http://linuxfinances.info/info/addthings.html>

Adding a table to replication

Slony-I does not allow you to add a table to a replication set that is already being replicated. In principle, it would certainly be possible; what would happen is that the SET_ADD_TABLE event would lead to the relevant code from the SUBSCRIBE_SET event being invoked to initialize the table. That would, regrettably, significantly complicate the logic of all of these components, so this is not permitted.

Instead, what you must do is thus:

  • Add the new table on each node.

    In principle, EXECUTE SCRIPT(7) could be used for this, but the fact that this leads to Locking Issues and requires altering all tables in some existing replication set, on all nodes, makes EXECUTE SCRIPT(7) an unattractive approach on a busy system. This breaks the Slony-I feature that you "don't have to interrupt normal activity to introduce replication."

    Instead, you may add the table via psql on each node.

  • Create a new replication set CREATE SET(7)

  • Add the table to the new set SET ADD TABLE(7)

  • Request subscription SUBSCRIBE SET(7) for this new set. If there are several nodes, you will need to SUBSCRIBE SET(7) once for each node that should subscribe.

  • Once the subscriptions have all been set up so that the new set has an identical set of subscriptions to the old set, you can merge the new set in alongside the old one via MERGE SET(7)


_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general

Reply via email to