public inbox for [email protected]
help / color / mirror / Atom feedFrom: Brian McKiernan <[email protected]>
To: [email protected]
Subject: Advice on Contiguous IDs
Date: Tue, 09 Jan 2018 01:06:26 -0800
Message-ID: <[email protected]> (raw)
Hi Folks,
Looking for some help/advice - not sure if this is the appropriate channel.
My Issue:
My primary keys in a certain table are not contiguous.
What I have done so far:
I have checked the documentation and found: https://wiki.postgresql.org/wiki/FAQ#Why_are_there_gaps_in_the_numbering_of_my_sequence.2FSERIAL_col... ( https://wiki.postgresql.org/wiki/FAQ#Why_are_there_gaps_in_the_numbering_of_my_sequence.2FSERIAL_col... )
mbers_reused_on_transaction_abort.3F ( https://wiki.postgresql.org/wiki/FAQ#Why_are_there_gaps_in_the_numbering_of_my_sequence.2FSERIAL_col... )
My Question:
1) What event would cause the CACHE clause in CREATE SEQUENCE to make an out of sequence next number?
2) In all cases am I correct in my thinking that in order to create contiguous primary key IDs then performance will greatly suffer? Do we have an idea of how bad this will generally be or what does that depend upon?
Many thanks in advance,
Brian
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Advice on Contiguous IDs
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox