Philip Warner pjw
Mon Sep 12 15:13:05 PDT 2005
Philip Warner wrote:

>Jan Wieck wrote:
>
>  
>
>>I would create a similar setup on test systems. Just identical schema,
>>no data. Stop both slon's once the subscribe is complete. data-only
>>dump and resture the current master into the test-slave. Data-only
>>dump and restore the test-masters slony tables sl_event and sl_log_1
>>with the contents from your dump (the partial one from the old
>>master). Now hack sl_confirm and sl_setsync on the test-slave so that
>>it matches the desired first SYNC to pick up and start the test-slave
>>slon process with the file-log-shipping option. 
>>    
>>
>
>Something's not quite working for me here;
>  
>
For posterity (and anyone else who ends up in my particular hell) you
also need to make sure that the sl_table.tab_id matches the original
tab_id from the event table (which won't be the case unless your slony
scripts survived or are generated in a standard way that works across db
instances); if necessary you can load the sl_table table from the old
db, but it will have the wrong tab_reloid. So you then run:

    update sl_table set tab_reloid = c.oid from pg_class c, pg_namespace
n where
        c.relname = sl_table.tab_relname and n.nspname = tab_nspname and
n.oid = c.relnamespace;

to make sure they get the right reloid. And you probably need to do this
on both master and slave (not sure -- certainly slave).






More information about the Slony1-general mailing list