Call updateRelName from the ddlScript_complete_int function instead of ddlScript_complete
because we want this function to be called on both subscribers and the origin.
This issue addresses something like renaming a table via EXECUTE SCRIPT where
sl_table will continue to have the old name on subscribers.
(cherry picked from commit
dfd8816556017fb0a3316b799accf617907c9b62)
v_query text;
v_row record;
begin
- perform @NAMESPACE@.updateRelname(p_set_id, p_only_on_node);
if p_only_on_node = -1 then
return @NAMESPACE@.createEvent('_@CLUSTERNAME@', 'DDL_SCRIPT',
p_set_id::text, p_script::text, p_only_on_node::text);
-- Grab the central configuration lock
-- ----
lock table @NAMESPACE@.sl_config_lock;
-
+ perform @NAMESPACE@.updateRelname(p_set_id, p_only_on_node);
-- ----
-- Check that we either are the set origin or a current
-- subscriber of the set.