Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 7F2511337B67 for ; Fri, 6 May 2011 16:08:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 05064-04 for ; Fri, 6 May 2011 19:08:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id A5DCF1337999 for ; Fri, 6 May 2011 16:08:23 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 06 May 2011 14:08:23 -0500 Message-Id: <4DC400CE020000250003D3BF@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 06 May 2011 14:08:14 -0500 From: "Kevin Grittner" To: "Jai Kumar Shamra" , Subject: Re: BUG #6012: Automatically generated sequence number jumps. References: <201105061536.p46FaluC051166@wwwmaster.postgresql.org> In-Reply-To: <201105061536.p46FaluC051166@wwwmaster.postgresql.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/40 X-Sequence-Number: 30179 "Jai Kumar Shamra" 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