Re: Advice on Contiguous IDs - Mailing list pgsql-docs

From David G. Johnston
Subject Re: Advice on Contiguous IDs
Date
Msg-id CAKFQuwbPWiAqu63fs3Ldx_ShaeBTYVmuGhR-E=yGDPVFv2qWXw@mail.gmail.com
Whole thread Raw
In response to Advice on Contiguous IDs  ("Brian McKiernan" <brian.mckiernan@firstcircle.com>)
List pgsql-docs
On Tue, Jan 9, 2018 at 2:06 AM, Brian McKiernan <brian.mckiernan@firstcircle.com> wrote:
1) What event would cause the CACHE clause in CREATE SEQUENCE to make an out of sequence next number?

​None - it will always issue the next sequential value when asked.  But the transaction asking doesn't have to use the provided value as the PK for the table or, and even if it does, if the transaction fails and rolls-back the sequence value it received is discarded/lost.​
​David J.​

pgsql-docs by date:

Previous
From: Vik Fearing
Date:
Subject: Re: libpq options
Next
From: Steve Atkins
Date:
Subject: Re: Advice on Contiguous IDs