From: | "Henshall, Stuart - WCP" <SHenshall(at)westcountrypublications(dot)co(dot)uk> |
---|---|
To: | "'Carolyn Lu Wong'" <carolyn(at)greatpacific(dot)com(dot)au>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: weird duplicate data problem |
Date: | 2001-12-17 15:20:52 |
Message-ID: | E2870D8CE1CCD311BAF50008C71EDE8E01F74757@MAIL_EXCHANGE |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
-----Original Message-----
From: Carolyn Lu Wong [mailto:carolyn(at)greatpacific(dot)com(dot)au]
Sent: 14 December 2001 07:29
To: pgsql-sql(at)postgresql(dot)org
Subject: weird duplicate data problem
a table was created with:
create table bills (
id serial not null,
account_no int4 not null,
date_issued date not null,
.....
);
The following SQL script returns only 1 row of data:
select oid, * from bills where id = xxxxx' order by oid;
--
Seems reasonable
--
However with the following SQL:
select oid, * from bills where date_issued = '01/01/2001'
order by oid;
some of the data is duplicated, including the OID.
--
OIDs are not guaranteed unique and can wraparound (unlesss there's a unique
index). However this seems a little unlikely in the same day so the only
thing I can think of is that there is a corrupt index on date_issued. Try
dropping and recreating any indexes.However I havn't really used 6.5 so
couldn't be sure.
--
When trying to 'vaccum' the database, get
NOTICE: Index bills_id_key: number of index tupples (4755) is not the
same as heap (7800).
What is happening? What could have caused this?
Database version used is V6.50. I know it's old, but i hope it's not the
version that's causing this problem.
Thanks in advance for any suggestions.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-12-17 17:04:07 | Re: Numbering Rows (SEQUENCE, OID) questions |
Previous Message | Tarun Galarani | 2001-12-17 12:42:47 | Re: Difference between DB2 7.0 & latest version of PostgresSQL? |