"Ben-Nes Michael" <miki@canaan.co.il> writes:
> Its not that I care about holes, but if roll back mean to return the DB to
> its original status because a foul sql chain command then logically I expect
> that everything will roll back like the action was never accorded
That's the general rule, but we specifically exempt sequences from the
rule, because it works better that way. Allowing sequence operators
to be non-blocking is considerably more useful for most people than
avoiding holes in the set of resulting row IDs.
All of this is documented in the CREATE SEQUENCE reference page, BTW.
regards, tom lane