Re: How to recover when can't start database

From: Alvaro Herrera <alvherre(at)surnet(dot)cl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Colin E(dot) Freas" <cef6(at)georgetown(dot)edu>, pgsql-admin(at)postgresql(dot)org
Subject: Re: How to recover when can't start database
Date: 2005-06-15 20:52:32
Message-ID: 20050615205232.GA12535@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Jun 10, 2005 at 12:34:15PM -0400, Tom Lane wrote:
> "Colin E. Freas" <cef6(at)georgetown(dot)edu> 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 (<alvherre[a]surnet.cl>)
"El hombre nunca sabe de lo que es capaz hasta que lo intenta" (C. Dickens)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David 2005-06-16 02:00:48 Re: Connecting via localhost pg-8.0.3
Previous Message David Pratt 2005-06-15 20:10:32 Advice on structure /sequence / trigger