Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA63708 for ; Wed, 30 Jun 1999 23:28:08 -0400 (EDT) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id XAA05930; Wed, 30 Jun 1999 23:26:12 -0400 (EDT) From: Bruce Momjian Message-Id: <199907010326.XAA05930@candle.pha.pa.us> Subject: Re: [SQL] begin/end/abort work for sequences? In-Reply-To: <377A08D5.77180127@sferacarta.com> from "[Jos_] Soares" at "Jun 30, 1999 02:08:53 pm" To: "[Jos_] Soares" Date: Wed, 30 Jun 1999 23:26:12 -0400 (EDT) CC: Kyle , pgsql-sql@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL56 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > > The sequence po_seq is advancing to the next value even though the > > transaction was aborted. If I put other things like updates, inserts, etc. > > inside the transaction, they seem to be rolled back OK, but not the > > update of the sequence. > > > > Am I doing something wrong? > > No. I can't explain you why but AFAIK sequences don't rollback. If we rolled back sequence numbers, we would have to lock the table until the transaction commited or was rolled back. That is too much locking so was not worth it. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026