reshapesubscription(p_sub_receiver integer, p_sub_provider integer, p_sub_origin integer)

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

# 8.94. reshapesubscription(p_sub_receiver integer, p_sub_provider integer, p_sub_origin integer)

Function Properties

Language: PLPGSQL

Return Type: integer

Run on a receiver/subscriber node when the provider for that subscription is being changed. Slonik will invoke this method before the SUBSCRIBE_SET event propogates to the receiver so listen paths can be updated.

    begin
    	update sl_subscribe
    		   set sub_provider=p_sub_provider
    		   from sl_set
    		   WHERE sub_set=sl_set.set_id
    		   and sl_set.set_origin=p_sub_origin and sub_receiver=p_sub_receiver;
    	if found then
    	   perform RebuildListenEntries();
    	   notify "_schemadoc_Restart";
    	end if;
    	return 0;
    end

Prev | Home | Next
replicate_partition(p_comment integer, p_idxname text, p_tabname text, p_nspname text, p_tab_id text) | Up | resubscribenode(p_receiver integer, p_provider integer, p_origin integer)