Re: Serial Jumping

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: Serial Jumping
Дата
Msg-id gm3t32$8nf$1@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на Serial Jumping  (db.subscriptions@shepherdhill.biz)
Список pgsql-general
On 2009-01-27, db.subscriptions@shepherdhill.biz <db.subscriptions@shepherdhill.biz> wrote:
> Hi,
>
> I have a table with BIG SERIAL field as Primary KEY. During high load,
> entries in the BIG SERIAL field are jumped. One could see a row with
> 1367 and expecting the next INSERT to be 1368, one would end up
> getting 1369.
>
> Please is this normal?

if an insert that would have used 1368 failed or is in an unfinished
transaction that's entirely normal.

if you care about the value you are inserting make sure you know it as
the time it is inserted (use returning or use nextval beforehand)


В списке pgsql-general по дате отправления:

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: Pet Peeves
Следующее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: ALTER TABLE with TYPE serial does not work