X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 69B758BA127 for ; Thu, 10 Feb 2005 05:36:09 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91532-09 for ; Thu, 10 Feb 2005 05:35:53 +0000 (GMT) Received: from mammoth.utopiasystems.net (meridian1.utopiasystems.net [66.150.45.40]) by svr1.postgresql.org (Postfix) with ESMTP id 3005C8B9EDC for ; Thu, 10 Feb 2005 05:35:53 +0000 (GMT) Received: from 67.173.111.107 ([67.173.111.107]) by mammoth.utopiasystems.net ([172.16.1.40]) via Exchange Front-End Server mail.utopiasystems.net ([172.16.1.42]) with Microsoft Exchange Server HTTP-DAV ; Thu, 10 Feb 2005 05:33:10 +0000 User-Agent: Microsoft-Entourage/11.1.0.040913 Date: Wed, 09 Feb 2005 23:35:47 -0600 Subject: Re: PG 7.4: duplicate rows in violation of unique From: Steve Lane To: Tom Lane Cc: "Joshua D. Drake" , , Jesse LaVere Message-ID: In-Reply-To: <22859.1108011047@sss.pgh.pa.us> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.566 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, RCVD_NUMERIC_HELO X-Spam-Level: * X-Archive-Number: 200502/79 X-Sequence-Number: 16247 > From: Tom Lane > Date: Wed, 09 Feb 2005 23:50:47 -0500 > To: Steve Lane > Cc: "Joshua D. Drake" , , > Jesse LaVere > Subject: Re: [ADMIN] PG 7.4: duplicate rows in violation of unique > > Steve Lane writes: >> Sorry -- 7.4.5 > > I'm wondering if this could be related to this post-7.4.5 fix: > > 2004-10-13 18:22 tgl > > * contrib/pgstattuple/pgstattuple.c, > src/backend/access/heap/heapam.c, > src/backend/utils/adt/ri_triggers.c (REL7_4_STABLE): Repair > possible failure to update hint bits back to disk, per > http://archives.postgresql.org/pgsql-hackers/2004-10/msg00464.php. > > What you are describing sure sounds like a foulup in commit status > marking for multiple versions of a row. I'm not convinced it would be > fixed by the abovementioned patch, but it sounds close. By the way -- this problem looks very much like one I reported a few months ago. I'll replay that email here: > I'm hoping I'm wrong, but I think I'm looking at a corrupted table or > database. We have a column that's sequence-driven, with a unique index, but > we're seeing duplicate values in that column. We're also seeing duplicate OIDs > in the affected table. And we're seeing this ominous message: > > iep_db=# select distinct * into lavere_form_004 from iep_form_004; > ERROR: missing chunk number 0 for toast value 42551774 We're getting the same thing tonight -- same "missing chunk number XX for toast value YYYY." If this is some form of MVCC "leakage", can that also explain this error? Would the "leaked" rows somehow be incomplete in the sense of not linking correctly to their corresponding toast data? -- sgl