Skip to content
Browse files

upgrade schema needs to create sl_components if it is missing

  • Loading branch information...
1 parent cd3519b commit d51049b54f014ee4f00f974fc9629a7d64ca9727 Christopher Browne committed Mar 18, 2011
Showing with 16 additions and 0 deletions.
  1. +16 −0 src/backend/slony1_funcs.sql
View
16 src/backend/slony1_funcs.sql
@@ -5233,6 +5233,22 @@ begin
-- restore sl_status
execute 'create view sl_status as ' || v_keepstatus;
end if;
+
+ if not exists (select 1 from information_schema.tables where table_schema = '_@CLUSTERNAME@' and table_name = 'sl_components') then
+ v_query := '
+create table @NAMESPACE@.sl_components (
+ co_actor text not null primary key,
+ co_pid integer not null,
+ co_node integer not null,
+ co_connection_pid integer not null,
+ co_activity text,
+ co_starttime timestamptz not null,
+ co_event bigint,
+ co_eventtype text
+) without oids;
+';
+ execute v_query;
+ end if;
return p_old;
end;
$$ language plpgsql

0 comments on commit d51049b

Please sign in to comment.
Something went wrong with that request. Please try again.