Re: [SQL] begin/end/abort work for sequences? - Mailing list pgsql-sql

From Kyle Bateman
Subject Re: [SQL] begin/end/abort work for sequences?
Date
Msg-id 377B7A2F.26209427@actarg.com
Whole thread Raw
In response to Re: [SQL] begin/end/abort work for sequences?  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [SQL] begin/end/abort work for sequences?
Re: [SQL] begin/end/abort work for sequences?
List pgsql-sql
Bruce Momjian wrote: <blockquote type="CITE">> > The sequence po_seq is advancing to the next value even though
the<br />> > transaction was aborted.  If I put other things like updates, inserts, etc. <br />> > inside
thetransaction, they seem to be rolled back OK, but not the <br />> > update of the sequence. <br />> > <br
/>>> Am I doing something wrong? <br />> <br />> No. I can't explain you why but AFAIK sequences don't 
rollback.<p>If we rolled back sequence numbers, we would have to lock the table <br />until the transaction commited or
wasrolled back.  That is too much <br />locking so was not worth it. <br /> </blockquote><p><br />That seems like a
prettybig thing to sacrifice.  Did sequence locking work before 6.5?  It was my impression that it did. <p>Do you know
ifthere is a workaround?  In my particular situation, it is critical that all instances of the sequence actually get
used. If a transaction is aborted, I lose an instance and everything gets messed up. <pre>-- 
 
 ----------------------------------------------------
 Kyle Bateman       President, Action Target Inc.
 "Viva Yo!"         kyle@actarg.com (801)377-8033x101
 ----------------------------------------------------</pre>  

pgsql-sql by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [SQL] String concat operator???
Next
From: Bruce Momjian
Date:
Subject: Re: [SQL] begin/end/abort work for sequences?