Hi All,
I've encountered this a few times before in the past, but sometimes
after I drop a table from replication, I cannot remove them from the
schema. I can successfully drop them from the origin database, but
on the subscriber databases, I encounter some errors, namely, the
following:
mydb=# begin; drop table new_gm_qm_set;
BEGIN
NOTICE: constraint new_gm_qm_template_qm_set_fkey on table
new_gm_qm_template depends on table new_gm_qm_set
NOTICE: constraint new_gm_qm_set_share_qm_set_fkey on table
new_gm_qm_set_share depends on table new_gm_qm_set
ERROR: "m_user_pkey" is an index
mydb=# rollback;
ROLLBACK
mydb=# begin; alter table new_gm_qm_template drop constraint
new_gm_qm_template_qm_set_fkey;
BEGIN
ALTER TABLE
mydb=# begin; alter table new_gm_qm_set_share drop constraint
new_gm_qm_set_share_qm_set_fkey;
WARNING: there is already a transaction in progress
BEGIN
ALTER TABLE
mydb=# drop table new_gm_qm_set;
ERROR: "m_user_pkey" is an index
mydb=# rollback;
ROLLBACK
mydb=# \d m_user
Table "public.m_user"
Column | Type
| Modifiers
-----------------------+-----------------------------
+-------------------------------------------------------------
id | integer | not null
default nextval(('m_user_id_seq'::text)::regclass)
first_name | text | not null
last_name | text | not null
[blah blah blah...]
Indexes:
"m_user_pkey" PRIMARY KEY, btree (id) CLUSTER
"m_user_email_key" UNIQUE, btree (email)
"m_user_first_name_search_idx" btree (lower(first_name))
"m_user_last_name_search_idx" btree (lower(last_name))
Check constraints:
"first_name_is_trimmed" CHECK (btrim(first_name, ' '::text) =
first_name)
"last_name_is_trimmed" CHECK (btrim(last_name, ' '::text) =
last_name)
Foreign-key constraints:
"m_user_language_fkey" FOREIGN KEY ("language") REFERENCES
m_language(id)
"pwd_question_fk" FOREIGN KEY (pwd_question) REFERENCES
m_password_questions(id)
"state_fk" FOREIGN KEY (state) REFERENCES state_province(id)
"user_agreement_fk" FOREIGN KEY (user_agreement) REFERENCES
m_user_agreement(id)
"user_type_fk" FOREIGN KEY (default_user_type) REFERENCES
m_user_type(id)
Triggers:
_mydb_denyaccess_7 BEFORE INSERT OR DELETE OR UPDATE ON m_user
FOR EACH ROW EXECUTE PROCEDURE _mydb.denyaccess('_mydb')
mydb=# \d new_gm_qm_set;
Table "public.new_gm_qm_set"
Column | Type | Modifiers
----------------+---------
+------------------------------------------------------------
id | integer | not null default nextval
('new_gm_qm_set_id_seq'::regclass)
owner | integer |
[blah blah blah...]
Indexes:
"new_gm_qm_set_pkey" PRIMARY KEY, btree (id)
Foreign-key constraints:
"new_gm_qm_set_owner_fkey" FOREIGN KEY ("owner") REFERENCES
m_user(id)
mydb=# begin; alter table new_gm_qm_set drop constraint
new_gm_qm_set_owner_fkey;
BEGIN
ERROR: "m_user_pkey" is an index
mydb=# rollback;
ROLLBACK
Not sure if this is enough detail, or if anyone would have any idea
why this happens. Again, I can successfully DROP TABLE from the
origin, but I cannot do so from the subscribers. Therefore, I
suspect that Slony has put my subscriber nodes in a strange state.
Please let me know if you need more detail. Any help would be
greatly appreciated!
--Richard
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general