Re: Serial not so unique?

From: Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au>
To: Joe Conway <joseph(dot)conway(at)home(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Serial not so unique?
Date: 2001-08-18 20:25:12
Message-ID: 20010819062512.B16924@sunhill.commsecure.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Aug 18, 2001 at 06:17:17AM -0700, Joe Conway wrote:
> > Sometimes (about 20%, it seems) with several of the data sets, we
> > get an error trying to insert rows into the table with the serial in it.
> > On investigation, it seems that the serial number has got to 101, then
> > set itself back to 4, causing nextval to return 5, and there are already
> > entries from 1-101.
> >
> > Now, we use the serial as the primary key, and we never explicitly set it.
> >
> > Has anyone seen anything like this? I can work around it by generating
> > a serial number within the application, but that's not ideal.
>
> Odd problem. What do you get if you run:
> select * from name_of_this_troublesome_sequence;
> particularly for increment_by, max_value, min_value, and is_cycled?
>
> -- Joe

1, 2^31 -1, 1, f

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Robert Norris 2001-08-18 20:26:15 Re: Serial not so unique?
Previous Message Cefull Lo 2001-08-18 19:03:01 time interval question