Re: BUG #2379: Duplicate pkeys in table - Mailing list pgsql-bugs

From Philip Warner
Subject Re: BUG #2379: Duplicate pkeys in table
Date
Msg-id 44353B66.6090803@rhyme.com.au
Whole thread Raw
In response to Re: BUG #2379: Duplicate pkeys in table  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2379: Duplicate pkeys in table
Next
From: Philip Warner
Date:
Subject: Re: BUG #2379: Duplicate pkeys in table