"Stéphane A. Schildknecht" stephane.schildknecht at postgresqlfr.org
Tue Mar 4 01:57:19 PST 2008
ajcity a écrit :
>  Hi All,
>   I trying to replicate a large database (2GB) from the master to a slave.
> The master has about 60 tables. When I added the smaller tables (<100000
> rows) it replicates but it queues up the sync events from the master and I
> don't see any data in the slave tables until its done. 
>   When I added a large table to another replication set, it takes like
> forever (which isn't the problem) but whenever there is a break in the
> internet connection, there is no data in the table when I it (after stopping
> the daemons) and when I restart daemon, it gives a "ERROR: Slony-I
> setAddTable_int(): table id 1 has already been assigned!" even though I am
> adding any table to the replication set.
>   Also I noticed that if I add the command:
>     sync (id=1);
>      wait for event (origin=1, confirmed=2, wait on=1, timeout=0);
>   to the subscribe command, it doesn't return until all the data has been
> copied (for small tables) or it never does (for a large table).
>    Does any one have an idea what could be wrong? I am following the
> commands as specified in the "Replicating Your First Database" section of
> the Slony help.
>    Also, when replicating a table which is always updated every 3 minutes,
> does slony added just the new data or does it start copying all the data
> again?
> 
>      Victor

Hi,

When you add a table to replication, first operation is to synchronize data.
The only way Slony can do it is to delete (or truncate when possible) all data
on the target table (slave) and copy all data from the source (master).

Therefore, if you table contains many Gb of data, and the net link is leak, it
certainly can take a very long time.

What's more, if any error occurs while synchronizing data set for the first
time, all synchronized data are lost, and the whole synchronisation processus
has to be processed again.

When the first synchronisation is OK, then only the diff is transfered from
master to slave.

Regards,

-- 
Stéphane SCHILDKNECHT
Président de PostgreSQLFr
Tél. 09 53 69 97 12
http://www.postgresqlfr.org


More information about the Slony1-general mailing list