pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: G. Anthony Reina <reina@nsi.edu>
To: Tim Perdue <perdue@raccoon.com>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [HACKERS] Number of tuples (20300) not the same as heap (20301)
Date: Tue, 27 Apr 1999 10:16:16 -0700
Message-ID: <3725F0DF.CD559BE5@nsi.edu> (raw)
References: <001801be904c$abcdd460$0b8c5aa5@timnt.weather.net>

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





view thread (3+ messages)

Message-ID: <3725F0DF.CD559BE5@nsi.edu>
Permalink:  ../3725F0DF.CD559BE5@nsi.edu/
Also on:    postgresql.org/message-id/3725F0DF.CD559BE5@nsi.edu

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: reina@nsi.edu, perdue@raccoon.com
  Subject: Re: [HACKERS] Number of tuples (20300) not the same as heap (20301)
  In-Reply-To: <3725F0DF.CD559BE5@nsi.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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