Christopher B. Browne's Home Page
cbbrowne@gmail.com

1.127. uninstallnode( )

Function Properties

PLPGSQLinteger
Reset the whole database to standalone by removing the whole replication system.
    declare
    	v_tab_row		record;
    begin
    	-- ----
    	-- Grab the central configuration lock
    	-- ----
    	lock table sl_config_lock;
    
    	-- ----
    	-- This is us ... time for suicide! Restore all tables to
    	-- their original status.
    	-- ----
    	for v_tab_row in select * from sl_table loop
    		perform alterTableRestore(v_tab_row.tab_id);
    		perform tableDropKey(v_tab_row.tab_id);
    	end loop;
    
    	raise notice 'Slony-I: Please drop schema "_schemadoc"';
    	return 0;
    end;

Google

If this was useful, let others know by an Affero rating

Contact me at cbbrowne@gmail.com