The UPDATE FUNCTIONS upgrade from a 2.1.x (or 2.0.x) Slony to 2.2.0 does not
authorJan Wieck <JanWieck@Yahoo.com>
Wed, 16 Oct 2013 03:05:56 +0000 (23:05 -0400)
committerJan Wieck <JanWieck@Yahoo.com>
Wed, 16 Oct 2013 03:05:56 +0000 (23:05 -0400)
create the no_failed column in sl_node.

src/backend/slony1_funcs.sql

index 5b3c4b4750d3e1b6db8c4187052c0e95ad54670d..d6a19a97ab8527610cd4d444b7e1e42747214f8b 100644 (file)
@@ -5371,6 +5371,10 @@ create table @NAMESPACE@.sl_components (
           execute v_query;
        end if;
 
+       
+
+
+
        if not exists (select 1 from information_schema.tables t where table_schema = '_@CLUSTERNAME@' and table_name = 'sl_event_lock') then
           v_query := 'create table @NAMESPACE@.sl_event_lock (dummy integer);';
           execute v_query;
@@ -5566,6 +5570,11 @@ create table @NAMESPACE@.sl_components (
                        where subs3.sub_receiver is null
                );
        end if;
+
+       if not @NAMESPACE@.check_table_field_exists('_@CLUSTERNAME@', 'sl_node', 'no_failed') then
+          alter table @NAMESPACE@.sl_node add column no_failed bool;
+          update @NAMESPACE@.sl_node set no_failed=false;
+       end if;
        return p_old;
 end;
 $$ language plpgsql;