Re: BUG #6012: Automatically generated sequence number jumps. - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #6012: Automatically generated sequence number jumps.
Date
Msg-id 4DC400CE020000250003D3BF@gw.wicourts.gov
Whole thread Raw
In response to BUG #6012: Automatically generated sequence number jumps.  ("Jai Kumar Shamra" <sharma.jaikumar@gmail.com>)
List pgsql-bugs
"Jai Kumar Shamra" <sharma.jaikumar@gmail.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6011: Some extra messages are output in the event log at PostgreSQL startup
Next
From: "MauMau"
Date:
Subject: Re: BUG #6011: Some extra messages are output in the event log at PostgreSQL startup