Re: Advice on Contiguous IDs

2018-01-10 Thread Brian McKiernan
Thanks folks - extremely insightful. Much appreciated. Brian On Wed 10 Jan 2018 at 01:33 Vik Fearing < Vik Fearing ( Vik Fearing ) > wrote: > > > > On 01/09/2018 10:06 AM, Brian McKiernan wrote: > > Hi Folks, > > > > Looking for some help/advice - not sure if this is the appropriate > chan

Re: Advice on Contiguous IDs

2018-01-09 Thread Vik Fearing
On 01/09/2018 10:06 AM, Brian McKiernan wrote: > Hi Folks, > > Looking for some help/advice - not sure if this is the appropriate channel. It is not. You want the pgsql-general list, or perhaps pgsql-novice. > My Issue: > My primary keys in a certain table are not contiguous. Is that really an

Re: Advice on Contiguous IDs

2018-01-09 Thread Steve Atkins
> On Jan 9, 2018, at 1:06 AM, Brian McKiernan > wrote: > > > Hi Folks, > > Looking for some help/advice - not sure if this is the appropriate channel. pgsql-general would be a better bet. > > My Issue: > My primary keys in a certain table are not contiguous. That itself isn't a problem at

Re: Advice on Contiguous IDs

2018-01-09 Thread David G. Johnston
On Tue, Jan 9, 2018 at 2:06 AM, Brian McKiernan < brian.mckier...@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 does

Re: Advice on Contiguous IDs

2018-01-09 Thread Alvaro Herrera
Brian McKiernan wrote: > My Issue: > My primary keys in a certain table are not contiguous. If you have a need to have values that are contiguous, you need to ask yourself why and then see what mechanism provides the semantics you need. An easy way is to lock the table containing the column, for