bug with serial field?

From: "Hernan J(dot) Gonzalez" <leonbloy(at)yahoo(dot)com>
To: pgsql-admin(at)postgreSQL(dot)org
Subject: bug with serial field?
Date: 2000-02-23 21:01:30
Message-ID: 20000223210130.28055.qmail@web206.mail.yahoo.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

My table 'clientes' has a serial field,
with name 'rid'.
Now, take a look at these queries:

ss => select rid from clientes where rid > 18974 and
rid < 18976;
rid
-----
18975
(1 row)

ss => select rid from clientes where rid = 18975;
rid
---
(0 rows)

A vacuum (or vacuum analyze) did not fix the
problem.
I only fixed this by droping and recreating
the (implicit) index for the sequence:

ss => drop index clientes_temp_rid_key;
ss => CREATE UNIQUE INDEX "clientes_temp_rid_key" on
"clientes" using btree ( "rid" "int4_ops" );

And now, it's ok:

ss => select rid from clientes where rid = 18975;
rid
-----
18975
(1 row)

Rather disturbing, isn't it? Any ideas ?

Hernan Gonzalez
Buenos Aires, Argentina

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Responses

  • passwords ? at 2000-02-24 03:22:35 from Benjamin Tehan

Browse pgsql-admin by date

  From Date Subject
Next Message paguilar 2000-02-23 23:39:57 Concurrent access
Previous Message Steven Pennie 2000-02-23 15:45:55 Developing a Schema