Brad Nicholson bnichols
Tue Aug 9 21:40:57 PDT 2005
Ujwal S. Setlur wrote:

>--- Brad Nicholson <bnichols at ca.afilias.info> wrote:
>
>  
>
>>Ujwal S. Setlur wrote:
>>
>>    
>>
>>>Hello,
>>>
>>>I would like to set up slony1 (1.1.0) to replicate
>>>      
>>>
>>an
>>    
>>
>>>existing database that has one large table (~30
>>>million rows) and several other smaller tables.
>>>
>>>I went throught the steps of setting up a fresh
>>>      
>>>
>>slave
>>    
>>
>>>and subscribing to the master. However, when I
>>>      
>>>
>>started
>>    
>>
>>>replication, access to tables (using select
>>>      
>>>
>>statemtns)
>>    
>>
>>>on the slave are locking up. I suspect it is due to
>>>the large amount of data being transferred.
>>>
>>>What is the best way to start replication of an
>>>existing large database?
>>>
>>>1. Currently all the tables are in one set. I can
>>>      
>>>
>>try
>>    
>>
>>>to move the large table into a different set, but I
>>>don't want to lock the application out of inserting
>>>new rows into the table on the master.
>>>
>>> 
>>>
>>>      
>>>
>>The subscribe will sub all the tables from one set
>>in one go.  If the 
>>other tables are small, there is likely to be
>>nothing gained from 
>>putting them into another set.
>>    
>>
>
>That is what I thought.
>
>  
>
>>BTW, you could do this without locking data writes
>>out of the master.  
>>Use the slonik command 'set drop table' to drop the
>>big table from your 
>>existing set, then create a new set containing the
>>big table.
>>
>>    
>>
>
>Can you elaborate on that a little? The big table is a
>data table that gets written to quite frequently. Can
>I avoid locking data writes to that table on the
>master during subscription?
>
>  
>

The statement above was about how you could easily move the big table 
into its own set, if you wanted to.

Subscribing a set will not lock the tables on the master (or the 
subscriber - but you will not see the data on the subscriber until the 
subscription is complete).  You will place additional load on that db 
while doing the subscribe, but at no point during a subscription will 
writes or reads to/from the master database be blocked.


-- 
Brad Nicholson  416-673-4106 
Database Administrator, Afilias Canada Corp.




More information about the Slony1-general mailing list