Francisco Olarte <folarte@peoplecall.com> writes:
> But I've read the docs and noticed the warning:
> "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."
> Which may lead people to think only rollbacks 'burn' numbers.
Yeah, good point. I'll do some wordsmithing on that.
> 2.- IIRC using cache>1 can lead to obtain sequence numbers out of
> order is using the same sequence in two different sessions. I assumed
> this is normal and do not have a problem with it, but people may get
> surprised by it, so I think a note there could help.
I think that's explained already, no?
regards, tom lane