Re: [HACKERS] Number of tuples (20300) not the same as heap (20301)

From: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>
To: Tim Perdue <perdue(at)raccoon(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Number of tuples (20300) not the same as heap (20301)
Date: 1999-04-27 17:16:16
Message-ID: 3725F0DF.CD559BE5@nsi.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tim Perdue wrote:

> I see this problem all the time too. There are some scary bugs in the bowels
> of the code that controls indexes and primary keys.
>
> At this point, I have like 4000 duplicated primary keys, and I cannot update
> sections of the table due to key violations.
>
> Tim Perdue
> PHPBuilder.com / GotoCity.com / Geocrawler.com
>

My co-worker fixed the table in question but the fix was kind of kludgy. He
performed a select on the table and outputted it to a text file. Then he wrote
a C program to search the text file for cases of two or more datasets in any
primary key. He then deleted the extra datasets with this search list. Lastly,
he vacuumed the corrected table. (Apparently, our searching on this table was
extremely slow because the vacuum doesn't work if you get this type of error).

Maybe you could find a similar fix for your table.

Hopefully, some of the hackers will be able to find the problem in the code.
Otherwise, the db works very well.
-Tony

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Taral 1999-04-27 19:54:47 Re: [HACKERS] Re: CORBA again. (was: light dawns: serious bug in FE/BE protocol handling)
Previous Message Matthias Schmitt 1999-04-27 17:09:55 Re: [HACKERS] Hacker found bug in Postgres ?