Re: Recreating constraint triggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dan Herbert <dan(at)iugo(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Recreating constraint triggers
Date: 2010-09-02 14:23:09
Message-ID: 22442.1283437389@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dan Herbert <dan(at)iugo(dot)com(dot)au> writes:
> select reltriggers from pg_class where relname='users';
>> Development db: 80
>> Live db: 2

Ouch. Are you running Slony by any chance? It's known to fool around
with reltriggers and sometimes mess it up. However, if you're not
getting constant bleats like
too many trigger records found for relation "users"
then the pg_trigger records must be gone too, which AFAIK Slony doesn't
do. Do you have *any* idea what caused this? Also, what PG version
are you running exactly?

As far as getting out of it is concerned, I'd be inclined to do a
"pg_dump -s" from the devel DB, manually extract all the
alter-add-constraint commands, and replay them into the live DB,
after having gotten rid of any duplicates of constraints that are
still there.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2010-09-02 14:32:18 Re: coping with failing disks
Previous Message Georgi Ivanov 2010-09-02 14:14:48 Strange/random overload of the server