Re: BUG #3051: FATAL: too many trigger records found for relation "pg_authid" - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #3051: FATAL: too many trigger records found for relation "pg_authid"
Date
Msg-id 20070223012342.GD7744@alvh.no-ip.org
Whole thread Raw
In response to BUG #3051: FATAL: too many trigger records found for relation "pg_authid"  ("Juan" <mozstyle2002@gmx.net>)
List pgsql-bugs
Juan wrote:

Hola Juan,

> psql: FATAL: too many trigger records found for relation "pg_authid" post
> duplicate any tables pg_* into my "test BD" using;
>
> #psql -d Test < pg_[any].sql
>
> I can delete de BD (it's only a test), but that's not idea, I need solve
> this problem.

It seems to me you managed to corrupt the catalogs.  Try starting a
standalone backend and issuing this query:

alvherre=# select tgname, tgfoid::regproc from pg_trigger where tgrelid = 'pg_authid'::regclass;
      tgname       |         tgfoid
-------------------+-------------------------
 pg_sync_pg_authid | flatfile_update_trigger
(1 fila)

If you get any tuple besides that one, that's a problem.

But really, what the message is saying is that the number of tuples
returned is different from what you get from

alvherre=# select reltriggers from pg_class where oid = 'pg_authid'::regclass;
 reltriggers
-------------
           1
(1 fila)

So if you have an extra trigger in pg_authid, you may be able to fix the
stuff to get it working by changing pg_class.reltriggers.  Or not, if
you managed to corrupt the catalogs in another way ;-)


To start a standalone backend on that test DB, stop the postmaster and
run

postgres -D /where/the/data/is/  "test DB"

you'll get a prompt like
PostgreSQL stand-alone backend 8.1.8
backend>

where you can enter the commands.

FWIW, you're missing 4 rounds of bugfixes; we're at 8.1.8 already.  One
of them may have corrupted your catalogs.  You're advised to upgrade.

Let me know how it goes.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-bugs by date:

Previous
From: "vishal saberwal"
Date:
Subject: Unsubscribe me
Next
From: Tom Lane
Date:
Subject: Re: BUG #3040: Domain type handling change in 8.2.2 breaks declarations