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 4435C6D5.8050602@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:
> Philip suggested to me off-list that the initial error may have been the
> VACUUM FULL (xid 32902872) creating duplicate moved copies of a single
> valid row.  That seems plausible because VACUUM FULL suppresses
> duplicate-index checks, and it's real hard to see any other way that a
> single transaction could have inserted all of these tuples without
> triggering the btree duplicate-key check (barring a completely corrupt
> index anyway).
Another interesting factor -- these problems have not yet happened on
any replicated DB. Slony replication works by using a trigger to store
data changes in a log table; these changes are then applied on the
destination DB. Slony also disables triggers on the destination. Because
of the update load we also run the same vacuum regime.

This seems to make it unlikely that vacuum is the sole culprit.

Another difference is that the replicated DB is only ever updated.
Virtually no load from applications reading data. I wonder if shared
buffers in some way also interact here.

pgsql-bugs by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: BUG #2377: pg_constraint didnt't updated when table
Next
From: Michael Fuhr
Date:
Subject: Re: BUG #2380: Sequence problem