Re: BUG #2379: Duplicate pkeys in table

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2379: Duplicate pkeys in table
Date: 2006-04-06 16:01:42
Message-ID: 44353B66.6090803@rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
> OK, I'm a bit confused by the obfuscation here. The table with the
> duplicates is xxx, or qqq?
Yes, xxx is the broken table. The two rewrite rules map updates on a
view to an underlying table (the broken one).

Updates on the view occur very frequently. Perhaps 400,000 per day? And,
sadly, 200,000 of those on this one row.

> Which one is the trigger attached to?
> zzz is a view I suppose?
>
The trigger is attached to yet another table; when an insert or update
occurs in this third table, a date field on xxx is updated.

Updates/inserts on this happen less frequently -- perhaps low 10's of
thousands per day.

I had forgotten about the view/rewrite rules until I looked again at the
db source (I thought they were triggers). These are the source of 90% of
the updates.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Philip Warner 2006-04-06 16:04:51 Re: BUG #2379: Duplicate pkeys in table
Previous Message Tom Lane 2006-04-06 15:51:29 Re: BUG #2379: Duplicate pkeys in table