droppath_int(p_pa_client integer, p_pa_server integer)

Slony-I 2.2.10 Documentation
Prev | Fast Backward | Chapter 8. Schema schemadoc | Fast Forward | Next

# 8.55. droppath_int(p_pa_client integer, p_pa_server integer)

Function Properties

Language: PLPGSQL

Return Type: integer

Process DROP_PATH event to drop path from pa_server to pa_client

    begin
    	-- ----
    	-- Grab the central configuration lock
    	-- ----
    	lock table sl_config_lock;

    	-- ----
    	-- Remove any dangling sl_listen entries with the server
    	-- as provider and the client as receiver. This must have
    	-- been cleared out before, but obviously was not.
    	-- ----
    	delete from sl_listen
    			where li_provider = p_pa_server
    			and li_receiver = p_pa_client;

    	delete from sl_path
    			where pa_server = p_pa_server
    			and pa_client = p_pa_client;

    	if found then
    		-- Rewrite sl_listen table
    		perform RebuildListenEntries();

    		return 1;
    	else
    		-- Rewrite sl_listen table
    		perform RebuildListenEntries();

    		return 0;
    	end if;
    end;

Prev | Home | Next
droppath(p_pa_client integer, p_pa_server integer) | Up | dropset(p_set_id integer)