関数特性
言語: PLPGSQL
戻り値: integer
レプリケーションからノード node_id を削除する DROP_NODE 事象を処理する内部関数declare p_no_id alias for $1; v_tab_row record; begin -- ---- -- 中枢構成にロックの取得 -- ---- lock table sl_config_lock; -- ---- -- 削除されたノードが遠隔ノードであれば、それに対する -- 全てのトレースから構成を掃除 -- ---- if p_no_id <> getLocalNodeId('_schemadoc') then delete from sl_subscribe where sub_receiver = p_no_id; delete from sl_listen where li_origin = p_no_id or li_provider = p_no_id or li_receiver = p_no_id; delete from sl_path where pa_server = p_no_id or pa_client = p_no_id; delete from sl_confirm where con_origin = p_no_id or con_received = p_no_id; delete from sl_event where ev_origin = p_no_id; delete from sl_node where no_id = p_no_id; return p_no_id; end if; -- ---- -- これは自分達 … ノードを今現在で無効にします。 -- デーモンは別のトランザクションで uninstallNode() を呼び出します。 -- ---- update sl_node set no_active = false where no_id = p_no_id; -- Rewrite sl_listen table perform RebuildListenEntries(); return p_no_id; end;