Re: BUG #6012: Automatically generated sequence number jumps.

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Jai Kumar Shamra" <sharma(dot)jaikumar(at)gmail(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6012: Automatically generated sequence number jumps.
Date: 2011-05-06 19:08:14
Message-ID: 4DC400CE020000250003D3BF@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Jai Kumar Shamra" <sharma(dot)jaikumar(at)gmail(dot)com> wrote:

> Description: Automatically generated sequence number jumps.

> We are facing problem of automatically sequence number changes in
> increasing order, why?

Probably transactions rolled back or someone used the setval
function. From the manual:

http://www.postgresql.org/docs/8.4/interactive/functions-sequence.html

| Important: To avoid blocking concurrent transactions that obtain
| numbers from the same sequence, a nextval operation is never
| rolled back; that is, once a value has been fetched it is
| considered used, even if the transaction that did the nextval
| later aborts. This means that aborted transactions might leave
| unused "holes" in the sequence of assigned values. setval
| operations are never rolled back, either.

Of course, you haven't given us a lot of detail from which to draw
conclusions. If the above doesn't fit with what you're seeing,
please read this and post again:

http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

-Kevin

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message MauMau 2011-05-07 00:35:05 Re: BUG #6011: Some extra messages are output in the event log at PostgreSQL startup
Previous Message Tom Lane 2011-05-06 19:05:12 Re: BUG #6011: Some extra messages are output in the event log at PostgreSQL startup