From cjwhite@cisco.com Wed Jun 23 19:29:27 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AFE19D1B1D9 for ; Wed, 23 Jun 2004 16:29:27 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02227-03 for ; Wed, 23 Jun 2004 19:29:27 +0000 (GMT) Received: from sj-iport-5.cisco.com (sj-iport-5.cisco.com [171.68.10.87]) by svr1.postgresql.org (Postfix) with ESMTP id B5009D1B1BC for ; Wed, 23 Jun 2004 16:29:24 -0300 (ADT) Received: from sj-core-4.cisco.com (171.68.223.138) by sj-iport-5.cisco.com with ESMTP; 23 Jun 2004 12:32:10 -0700 X-BrightmailFiltered: true Received: from cjwhitew2k02 (dhcp-128-107-147-47.cisco.com [128.107.147.47]) by sj-core-4.cisco.com (8.12.10/8.12.6) with ESMTP id i5NJTNZr009199 for ; Wed, 23 Jun 2004 12:29:24 -0700 (PDT) Reply-To: From: "Chris White (cjwhite)" To: Subject: Error when dropping table Date: Wed, 23 Jun 2004 12:29:23 -0700 Message-ID: <028f01c45958$63e76640$0200a8c0@amer.cisco.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0290_01C4591D.B7888E40" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=HTML_60_70, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200406/318 X-Sequence-Number: 13978 This is a multi-part message in MIME format. ------=_NextPart_000_0290_01C4591D.B7888E40 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 7.4.2, I am trying to drop a table using the command drop table vm_message cascade; and I get the error message relation "vm_message" has rel_triggers = 0 and the table is not dropped. What does this message mean and how can I drop the table? ------=_NextPart_000_0290_01C4591D.B7888E40 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message
On 7.4.2,= I am=20 trying to drop a table using the command
 
drop tabl= e=20 vm_message cascade;
 
and I get= the error=20 message
 
relation= =20 "vm_message" has rel_triggers =3D 0
 
and the t= able is not=20 dropped. What does this message mean and how can I drop the=20 table?
 
 
------=_NextPart_000_0290_01C4591D.B7888E40-- From tgl@sss.pgh.pa.us Wed Jun 23 20:34:01 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9EC98D1B2BD for ; Wed, 23 Jun 2004 17:34:01 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30690-08 for ; Wed, 23 Jun 2004 20:33:58 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1597CD1B27A for ; Wed, 23 Jun 2004 17:33:55 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5NKWSq4005345; Wed, 23 Jun 2004 16:32:28 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-admin@postgresql.org Subject: Re: Error when dropping table In-reply-to: <028f01c45958$63e76640$0200a8c0@amer.cisco.com> References: <028f01c45958$63e76640$0200a8c0@amer.cisco.com> Comments: In-reply-to "Chris White (cjwhite)" message dated "Wed, 23 Jun 2004 12:29:23 -0700" Date: Wed, 23 Jun 2004 16:32:28 -0400 Message-ID: <5344.1088022748@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/319 X-Sequence-Number: 13979 "Chris White (cjwhite)" writes: > On 7.4.2, I am trying to drop a table using the command > drop table vm_message cascade; > and I get the error message > relation "vm_message" has rel_triggers = 0 I can't find any such error message in the 7.4 sources. Could we see the exact error display with "\set VERBOSITY verbose"? regards, tom lane From tgl@sss.pgh.pa.us Wed Jun 23 20:39:30 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 22BA2D1B289 for ; Wed, 23 Jun 2004 17:39:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27180-09 for ; Wed, 23 Jun 2004 20:39:27 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 80EE4D1B19C for ; Wed, 23 Jun 2004 17:39:23 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5NKcIud005399; Wed, 23 Jun 2004 16:38:18 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-admin@postgresql.org Subject: Re: Error when dropping table In-reply-to: <5344.1088022748@sss.pgh.pa.us> References: <028f01c45958$63e76640$0200a8c0@amer.cisco.com> <5344.1088022748@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 23 Jun 2004 16:32:28 -0400" Date: Wed, 23 Jun 2004 16:38:17 -0400 Message-ID: <5398.1088023097@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/320 X-Sequence-Number: 13980 Tom Lane writes: > "Chris White (cjwhite)" writes: >> On 7.4.2, I am trying to drop a table using the command >> drop table vm_message cascade; >> and I get the error message >> relation "vm_message" has rel_triggers = 0 > I can't find any such error message in the 7.4 sources. Oh, here it is --- should have checked the spelling of the pg_class field: elog(ERROR, "relation \"%s\" has reltriggers = 0", RelationGetRelationName(rel)); The most likely bet is that a failed pg_restore left the relation's triggers disabled. You can fix this by doing what the restore should have done: UPDATE pg_catalog.pg_class SET reltriggers = (SELECT count(*) FROM pg_catalog.pg_trigger where pg_class.oid = tgrelid) FROM pg_catalog.pg_namespace WHERE relnamespace = pg_namespace.oid AND nspname !~ '^pg_'; regards, tom lane From cjwhite@cisco.com Wed Jun 23 21:00:56 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AF15ED1B19C for ; Wed, 23 Jun 2004 18:00:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39160-09 for ; Wed, 23 Jun 2004 21:00:49 +0000 (GMT) Received: from sj-iport-5.cisco.com (sj-iport-5.cisco.com [171.68.10.87]) by svr1.postgresql.org (Postfix) with ESMTP id 5958FD1B489 for ; Wed, 23 Jun 2004 18:00:46 -0300 (ADT) Received: from sj-core-4.cisco.com (171.68.223.138) by sj-iport-5.cisco.com with ESMTP; 23 Jun 2004 14:02:34 -0700 X-BrightmailFiltered: true Received: from cjwhitew2k02 (dhcp-128-107-147-47.cisco.com [128.107.147.47]) by sj-core-4.cisco.com (8.12.10/8.12.6) with ESMTP id i5NKxlZr028376; Wed, 23 Jun 2004 13:59:47 -0700 (PDT) Reply-To: From: "Chris White (cjwhite)" To: "'Tom Lane'" Cc: Subject: Re: Error when dropping table Date: Wed, 23 Jun 2004 14:00:43 -0700 Message-ID: <029b01c45965$261de980$0200a8c0@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal In-Reply-To: <5344.1088022748@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/321 X-Sequence-Number: 13981 ERROR: XX000: relation "vm_message" has rel_triggers = 0 LOCATION: RemoveTriggerById, commands/trigger.c:581 -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Tom Lane Sent: Wednesday, June 23, 2004 1:32 PM To: cjwhite@cisco.com Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Error when dropping table "Chris White (cjwhite)" writes: > On 7.4.2, I am trying to drop a table using the command > drop table vm_message cascade; > and I get the error message > relation "vm_message" has rel_triggers = 0 I can't find any such error message in the 7.4 sources. Could we see the exact error display with "\set VERBOSITY verbose"? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) From cjwhite@cisco.com Wed Jun 23 21:14:59 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7CCF1D1B37D for ; Wed, 23 Jun 2004 18:14:59 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 52496-08 for ; Wed, 23 Jun 2004 21:14:52 +0000 (GMT) Received: from sj-iport-4.cisco.com (sj-iport-4.cisco.com [171.68.10.86]) by svr1.postgresql.org (Postfix) with ESMTP id 89945D1B1C9 for ; Wed, 23 Jun 2004 18:14:47 -0300 (ADT) X-BrightmailFiltered: true Received: from cjwhitew2k02 (dhcp-128-107-147-47.cisco.com [128.107.147.47]) by sj-core-4.cisco.com (8.12.10/8.12.6) with ESMTP id i5NL0gZr028984; Wed, 23 Jun 2004 14:00:43 -0700 (PDT) Reply-To: From: "Chris White (cjwhite)" To: "'Tom Lane'" Cc: Subject: Re: Error when dropping table Date: Wed, 23 Jun 2004 14:01:01 -0700 Message-ID: <029c01c45965$30cda910$0200a8c0@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal In-Reply-To: <5398.1088023097@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/322 X-Sequence-Number: 13982 Thanks -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Wednesday, June 23, 2004 1:38 PM To: cjwhite@cisco.com Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Error when dropping table Tom Lane writes: > "Chris White (cjwhite)" writes: >> On 7.4.2, I am trying to drop a table using the command >> drop table vm_message cascade; >> and I get the error message >> relation "vm_message" has rel_triggers = 0 > I can't find any such error message in the 7.4 sources. Oh, here it is --- should have checked the spelling of the pg_class field: elog(ERROR, "relation \"%s\" has reltriggers = 0", RelationGetRelationName(rel)); The most likely bet is that a failed pg_restore left the relation's triggers disabled. You can fix this by doing what the restore should have done: UPDATE pg_catalog.pg_class SET reltriggers = (SELECT count(*) FROM pg_catalog.pg_trigger where pg_class.oid = tgrelid) FROM pg_catalog.pg_namespace WHERE relnamespace = pg_namespace.oid AND nspname !~ '^pg_'; regards, tom lane