diff options
-rw-r--r-- | doc/adminguide/slonik_ref.sgml | 9 | ||||
-rw-r--r-- | src/backend/slony1_funcs.sql | 20 |
2 files changed, 27 insertions, 2 deletions
diff --git a/doc/adminguide/slonik_ref.sgml b/doc/adminguide/slonik_ref.sgml index eff6d86c..bffcb8bd 100644 --- a/doc/adminguide/slonik_ref.sgml +++ b/doc/adminguide/slonik_ref.sgml @@ -1511,6 +1511,10 @@ STORE PATH ( SERVER = 1, CLIENT = 2, the request <emphasis>will fail.</emphasis></para></listitem> + <listitem><para> If the table is found to be in some internal + &postgres; schemas or appears to be a &slony1; replication + configuration table, the request will fail.</para></listitem> + </itemizedlist></para> </warning> @@ -1727,6 +1731,11 @@ SET ADD TABLE ( </programlisting> + + <para> If the sequence is found to be in some internal &postgres; + schemas or appears to be a &slony1; replication configuration + table, the request will fail.</para> + </refsect1> <refsect1> <title> Locking Behaviour </title> diff --git a/src/backend/slony1_funcs.sql b/src/backend/slony1_funcs.sql index 9e6ebf67..542b9402 100644 --- a/src/backend/slony1_funcs.sql +++ b/src/backend/slony1_funcs.sql @@ -2862,7 +2862,14 @@ begin raise exception 'Slony-I: setAddTable_int(): % is not a regular table', p_fqname; end if; - + if v_tab_nspname in ('information_schema', 'pg_catalog') then + raise exception 'Slony-I: setAddTable_int(): % is in an internal catalog and cannot be replicated', + p_fqname; + end if; + if v_tab_nspname ~ '^_.*' and v_tab_relname ~ '^sl_.*' then + raise exception 'Slony-I: setAddTable_int(): % appears to be a replication configuration table and cannot be replicated', + p_fqname; + end if; if not exists (select indexrelid from "pg_catalog".pg_index PGX, "pg_catalog".pg_class PGC where PGX.indrelid = v_tab_reloid @@ -3157,7 +3164,16 @@ begin p_fqname; end if; - select 1 into v_sync_row from @NAMESPACE@.sl_sequence where seq_id = p_seq_id; + if v_seq_nspname in ('information_schema', 'pg_catalog') then + raise exception 'Slony-I: setAddSequence_int(): % is in an internal catalog and cannot be replicated', + p_fqname; + end if; + if v_seq_nspname ~ '^_.*' and v_seq_relname ~ '^sl_.*' then + raise exception 'Slony-I: setAddSequence_int(): % appears to be a replication configuration sequence and cannot be replicated', + p_fqname; + end if; + + select 1 into v_sync_row from @NAMESPACE@.sl_sequence where seq_id = p_seq_id; if not found then v_relkind := 'o'; -- all is OK else |