Re: BUG #15010: Sequence ID is getting skipped

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: BUG #15010: Sequence ID is getting skipped
Дата
Msg-id 91542DCB-90A4-48B2-B989-D879D0C7835C@yesql.se
обсуждение исходный текст
Ответ на BUG #15010: Sequence ID is getting skipped  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
> On 15 Jan 2018, at 08:36, David G. Johnston <david.g.johnston@gmail.com> wrote:
>
> On Sunday, January 14, 2018, PG Bug reporting form <noreply@postgresql.org <mailto:noreply@postgresql.org>> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      15010
> Logged by:          Anil Kumar G V
> Email address:      anilkumar.gv@gmail.com <mailto:anilkumar.gv@gmail.com>
> PostgreSQL version: 9.3.0
> Operating system:   Ubuntu
> Description:
>
> Sometime sequence ID is getting skipped by 32 numbers. Here is some sample
> sequence definition.
>
> I don't think the exact cause of this particular skipping is documented (it's database startup, maybe crash, related
Ithink) but sequences are not promised to be gap-less. 

Sequences are indeed not guaranteed to be gapless, and given that the report is
for 32 numbers it sounds like the SEQ_LOG_VALS skipping. From sequence.c:

/*
 * We don't want to log each fetching of a value from a sequence,
 * so we pre-log a few fetches in advance. In the event of
 * crash we can lose (skip over) as many values as we pre-logged.
 */
#define SEQ_LOG_VALS    32

cheers ./daniel

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: BUG #15010: Sequence ID is getting skipped
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15011: pgAdmin doesn't connect local server