pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Error: duplicate key violates unique constraint - "pg_toast_3270368541_index
4+ messages / 2 participants
[nested] [flat]

* Error: duplicate key violates unique constraint - "pg_toast_3270368541_index
@ 2007-11-15 01:32 Tomeh, Husam <HTomeh@facorelogic.com>
  2007-11-15 05:37 ` Re: Error: duplicate key violates unique constraint - "pg_toast_3270368541_index Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Tomeh, Husam @ 2007-11-15 01:32 UTC (permalink / raw)
  To: pgsql-admin

Hi,
 
We've started getting duplicate key violates unique constraint error on
one of the toast index starting last weekend. This error occurs when
attempting to update a huge table. 
 
             ERROR:  duplicate key violates unique constraint
"pg_toast_3270368541_index"
 
PG version is 8.0 with postgis extension. We're planning to upgrade by
end of year though. 
 
select count(*) from pg_toast.pg_toast_3270368541;
     count
    ---------
    7663472
 
 
We've tried a couple of things:
 
1) Reprocess the failed extract files by resubmitting them (basically,
re-run the updates). It worked so far until today where we retried two
times and the update kept failing.
2) Reindex the toast index but that still did not help. 
 
We also run vacuum every night to avoid transaction wraparound limit, so
I'm hoping this is error is not related to it..
 
Is there any workaround to fix this duplicate constraints error?  Your
assistance is greatly appreciated.  
 
 
    Husam Tomeh


 
 

**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged.  If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.  If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

                                   FADLD Tag
**********************************************************************

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Error: duplicate key violates unique constraint - "pg_toast_3270368541_index
  2007-11-15 01:32 Error: duplicate key violates unique constraint - "pg_toast_3270368541_index Tomeh, Husam <HTomeh@facorelogic.com>
@ 2007-11-15 05:37 ` Tom Lane <tgl@sss.pgh.pa.us>
  2007-11-15 16:16   ` Re: Error: duplicate key violates unique constraint - "pg_toast_3270368541_index Tomeh, Husam <HTomeh@facorelogic.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2007-11-15 05:37 UTC (permalink / raw)
  To: Tomeh, Husam <HTomeh@facorelogic.com>; +Cc: pgsql-admin

"Tomeh, Husam" <HTomeh@facorelogic.com> writes:
> We've started getting duplicate key violates unique constraint error on
> one of the toast index starting last weekend.

> PG version is 8.0 with postgis extension.

Consider updating to something more recent.  That problem was
addressed in this 8.1-cycle patch:
http://archives.postgresql.org/pgsql-committers/2005-08/msg00109.php

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Error: duplicate key violates unique constraint - "pg_toast_3270368541_index
  2007-11-15 01:32 Error: duplicate key violates unique constraint - "pg_toast_3270368541_index Tomeh, Husam <HTomeh@facorelogic.com>
  2007-11-15 05:37 ` Re: Error: duplicate key violates unique constraint - "pg_toast_3270368541_index Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-11-15 16:16   ` Tomeh, Husam <HTomeh@facorelogic.com>
  2007-11-15 16:49     ` Re: Error: duplicate key violates unique constraint - "pg_toast_3270368541_index Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Tomeh, Husam @ 2007-11-15 16:16 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin


Thanks Tom. As a temporarily solution though, would reorging the table
(pgdump,drop/truncate, reload) resolve the OID collision issue and buy
us some time until we get the upgrade going?  


Regards,
 
  Husam Tomeh


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
Sent: Wednesday, November 14, 2007 9:37 PM
To: Tomeh, Husam
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Error: duplicate key violates unique constraint -
"pg_toast_3270368541_index

"Tomeh, Husam" <HTomeh@facorelogic.com> writes:
> We've started getting duplicate key violates unique constraint error 
> on one of the toast index starting last weekend.

> PG version is 8.0 with postgis extension.

Consider updating to something more recent.  That problem was addressed
in this 8.1-cycle patch:
http://archives.postgresql.org/pgsql-committers/2005-08/msg00109.php

			regards, tom lane

**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged.  If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.  If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

                                   FADLD Tag
**********************************************************************




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Error: duplicate key violates unique constraint - "pg_toast_3270368541_index
  2007-11-15 01:32 Error: duplicate key violates unique constraint - "pg_toast_3270368541_index Tomeh, Husam <HTomeh@facorelogic.com>
  2007-11-15 05:37 ` Re: Error: duplicate key violates unique constraint - "pg_toast_3270368541_index Tom Lane <tgl@sss.pgh.pa.us>
  2007-11-15 16:16   ` Re: Error: duplicate key violates unique constraint - "pg_toast_3270368541_index Tomeh, Husam <HTomeh@facorelogic.com>
@ 2007-11-15 16:49     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2007-11-15 16:49 UTC (permalink / raw)
  To: Tomeh, Husam <HTomeh@facorelogic.com>; +Cc: pgsql-admin

"Tomeh, Husam" <HTomeh@facorelogic.com> writes:
> Thanks Tom. As a temporarily solution though, would reorging the table
> (pgdump,drop/truncate, reload) resolve the OID collision issue and buy
> us some time until we get the upgrade going?  

Probably.  I wouldn't bother with pg_dump, just INSERT ... SELECT
the data into a new table and then rename that one into place.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2007-11-15 16:49 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-11-15 01:32 Error: duplicate key violates unique constraint - "pg_toast_3270368541_index Tomeh, Husam <HTomeh@facorelogic.com>
2007-11-15 05:37 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-11-15 16:16   ` Tomeh, Husam <HTomeh@facorelogic.com>
2007-11-15 16:49     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox