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 C776B52818 for ; Wed, 15 Jun 2005 17:52:39 -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 96991-06 for ; Wed, 15 Jun 2005 20:52:33 +0000 (GMT) Received: from mr2.surnet.cl (smtp2.surnet.cl [216.155.73.163]) by svr1.postgresql.org (Postfix) with ESMTP id 133AB5280D for ; Wed, 15 Jun 2005 17:52:32 -0300 (ADT) Received: from smtp2.surnet.cl (216.155.73.169) by mr2.surnet.cl (7.0.031.3) id 4259ADFA00EA814E; Wed, 15 Jun 2005 16:52:39 -0400 Received: from smtp1.surnet.cl (smtp1.surnet.cl []) by mr2.surnet.cl ([216.155.73.169]); Wed, 15 Jun 2005 20:52:38 +0000 Received: from cluster.surnet.cl (216.155.73.164) by smtp1.surnet.cl (7.0.031.3) id 42587C6E00B84631; Wed, 15 Jun 2005 16:51:58 -0400 Received: from localhost (216.155.79.59) by cluster.surnet.cl (7.0.031.3) id 42AAB654000A45E8; Wed, 15 Jun 2005 16:52:30 -0400 Received: by localhost (Postfix, from userid 1000) id B3693C2DC08; Wed, 15 Jun 2005 16:52:32 -0400 (CLT) Date: Wed, 15 Jun 2005 16:52:32 -0400 From: Alvaro Herrera To: Tom Lane Cc: "Colin E. Freas" , pgsql-admin@postgresql.org Subject: Re: How to recover when can't start database Message-ID: <20050615205232.GA12535@surnet.cl> References: <42A9B2B9.80907@georgetown.edu> <23357.1118421255@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23357.1118421255@sss.pgh.pa.us> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.579 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, FORGED_RCVD_HELO X-Spam-Level: * X-Archive-Number: 200506/103 X-Sequence-Number: 17858 On Fri, Jun 10, 2005 at 12:34:15PM -0400, Tom Lane wrote: > "Colin E. Freas" writes: > > 2005-06-07 16:02:38 EDTLOG: statement: update pg_class set > > reltriggers=foo.c from (select relname,count(tgrelid) as c from > > pg_class,pg_trigger where pg_class.oid=tgrelid and relnamespace=2200 > > group by relname) foo; > > I'm afraid that database is toast :-(. You managed to overwrite > reltriggers in every row of pg_class, including all the system > catalogs, including some that absolutely positively cannot have > triggers ... like pg_trigger for instance. > > -> try to open pg_class > ... hmm, it says it has triggers > -> try to open pg_trigger to read triggers > ... hmm, it says it has triggers > -> try to open pg_trigger to read triggers > ... hmm, it says it has triggers > -> try to open pg_trigger to read triggers > > ... recurse until out of stack space. IIRC Joe Conway had this problem some time ago, and he managed to get out of it. I don't recall details, maybe searching the archives ... -- Alvaro Herrera () "El hombre nunca sabe de lo que es capaz hasta que lo intenta" (C. Dickens)