Problem dropping table - Mailing list pgsql-general

From Ken Logan
Subject Problem dropping table
Date
Msg-id 1190136652.4730.24.camel@ken
Whole thread Raw
Responses Re: Problem dropping table
List pgsql-general

We are using postgresql 8.2.3 with slony1 1.2.8 and we're having problems trying to drop a table on the slony1 secondary that was sucessfully dropped on the master database.

I'm sure this is just because I'm missing something, but it doesn't seem like there should be any reason the table cannot be dropped. The problem seems to be due to a foreign key constraint on the table we are trying to drop, I don't believe any other tables reference the table we are trying to drop with foreign key constraints.

The schema of the table is as follows:
   Table "public.member_note"
  Column   |  Type   | Modifiers
-----------+---------+-----------
member_id | bigint  | not null
notes_id  | bigint  | not null
notes_idx | integer | not null
Foreign-key constraints:
    "fkb5d78a7737864f78" FOREIGN KEY (member_id) REFERENCES member(id)
    "fkb5d78a77503a5452" FOREIGN KEY (notes_id) REFERENCES note(id)

When we try to drop the table we get the error:
ERROR:  "member_pkey" is an index

This error seems to have something to do with the primary key in the related member table:
                 Table "public.member"
      Column       |          Type          | Modifiers
-------------------+------------------------+-----------
discriminator     | character varying(31)  | not null
id                | bigint                 | not null
deleted           | boolean                | not null
status            | character varying(255) | not null
principal_id      | bigint                 |
extravaluelist_id | bigint                 |
Indexes:
    "member_pkey" PRIMARY KEY, btree (id)
    "member_principal_id_key" btree (principal_id)
Foreign-key constraints:
    "fk892776ba530919c4" FOREIGN KEY (extravaluelist_id) REFERENCES extravaluelist(id)
    "fk892776baa88520c6" FOREIGN KEY (principal_id) REFERENCES principal(id)


We have also tried to drop the foreign key constraint on the table as an intermediate step to getting rid of the table:
alter table member_note drop constraint fkb5d78a7737864f78;
ERROR:  "member_pkey" is an index

Anyone know how to drop this table or what the error means?





pgsql-general by date:

Previous
From: Christian Schröder
Date:
Subject: Performance Issues (was: "like" vs "substring" again)
Next
From: Alan Hodgson
Date:
Subject: Re: Problem dropping table