Permalink
Browse files

Missing altertable to drop/re-add replication triggers in the functions

ddlscript_prepare()/ddlscript_complete().
  • Loading branch information...
1 parent e249f5f commit 3bed90552477a75eb72f673e5f907feb424cb43d Christopher Browne committed Dec 15, 2006
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/backend/slony1_funcs.sql
@@ -6,7 +6,7 @@
-- Copyright (c) 2003-2004, PostgreSQL Global Development Group
-- Author: Jan Wieck, Afilias USA INC.
--
--- $Id: slony1_funcs.sql,v 1.98.2.6 2006-12-05 23:37:06 cbbrowne Exp $
+-- $Id: slony1_funcs.sql,v 1.98.2.7 2006-12-15 05:26:58 cbbrowne Exp $
-- ----------------------------------------------------------------------
-- **********************************************************************
@@ -3702,6 +3702,7 @@ begin
-- Create a SYNC event, run the script and generate the DDL_SCRIPT event
-- ----
perform @NAMESPACE@.createEvent(''_@CLUSTERNAME@'', ''SYNC'', NULL);
+ perform @NAMESPACE@.alterTableRestore(tab_id) from @NAMESPACE@.sl_table where tab_set in (select set_id from @NAMESPACE@.sl_set where set_origin = @NAMESPACE@.getLocalNodeId(''_@CLUSTERNAME@''));
return 1;
end;
' language plpgsql;
@@ -3726,6 +3727,7 @@ declare
v_set_origin int4;
begin
perform @NAMESPACE@.updateRelname(p_set_id, p_only_on_node);
+ perform @NAMESPACE@.alterTableForReplication(tab_id) from @NAMESPACE@.sl_table where tab_set in (select set_id from @NAMESPACE@.sl_set where set_origin = @NAMESPACE@.getLocalNodeId(''_@CLUSTERNAME@''));
return @NAMESPACE@.createEvent(''_@CLUSTERNAME@'', ''DDL_SCRIPT'',
p_set_id, p_script, p_only_on_node);
end;

0 comments on commit 3bed905

Please sign in to comment.