Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EE6189FB274 for ; Mon, 16 Oct 2006 13:25:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 65210-04 for ; Mon, 16 Oct 2006 13:25:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E7A8B9FA646 for ; Mon, 16 Oct 2006 13:25:13 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k9GGPCno022211; Mon, 16 Oct 2006 12:25:12 -0400 (EDT) To: "Paul Laughlin" cc: pgsql-bugs@postgresql.org Subject: Re: duplicate key violates unique constraint pg_toast_635216540 In-reply-to: References: Comments: In-reply-to "Paul Laughlin" message dated "Mon, 16 Oct 2006 09:16:46 -0700" Date: Mon, 16 Oct 2006 12:25:12 -0400 Message-ID: <22210.1161015912@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.088 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/118 X-Sequence-Number: 15987 "Paul Laughlin" writes: > For the last 6 months or so we've had an intermittent issue while doing a > data import with a simple update statement. The fix that we've found for > this issue is to REINDEX TABLE ; What PG version is this? Are you sure that the REINDEX actually does anything, as opposed to merely retrying the data import? I'm thinking you may be having problems with OID collisions after OID wraparound, which is something 8.1 should defend against but no earlier version does. What do you get from select count(distinct chunk_id) from pg_toast.pg_toast_635216540 ; regards, tom lane