Re: sequence skips 30 values, how?

From: "Angva" <angvaw(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: sequence skips 30 values, how?
Date: 2007-01-31 16:34:32
Message-ID: 1170261272.680497.145650@p10g2000cwp.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

As others have said, sequences can have gaps. In fact, the thought of
a gap-free sequence is scary to me. Unless you do very few inserts,
"gap-free sequence" is pretty much synonymous with "not scalable". If
your goal is to generate a unique number for each row (which is
usually the case), then gaps should be fine.

Though I must admit I have occasionally wished for sequences with a
GAPFREE option...For small, static look-up tables that I update once
in a blue moon. It's just easier on the eyes to have 1,2,3,4,5 than 1,
25, 2405, 95720, 59028598253.

Mark

On Jan 31, 7:43 am, esote(dot)(dot)(dot)(at)3times25(dot)net (Geoffrey) wrote:
> We are trying to track down an issue with our PostgreSQL application.
> We are running PostgreSQL 7.4.13 on Red Hat Enterprise ES 3.
>
> We have a situation where the postgres backend process drops core and
> dies. We've tracked this to an unusual situation where a sequence value
> that is being created during the process that is causing the core file
> generation. The thing that is bizarre is that the sequence value skips
> 30+ entries.
>
> How is this even possible? Any suggestions would be greatly appreciated.
>
> --
> Until later, Geoffrey

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jorge Godoy 2007-01-31 17:18:31 Re: Any Plans for cross database queries on the same server?
Previous Message Tom Lane 2007-01-31 16:34:30 Re: When an index and a constraint have the same name...