pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15010: Sequence ID is getting skipped
3+ messages / 3 participants
[nested] [flat]

* BUG #15010: Sequence ID is getting skipped
@ 2018-01-15 06:43 PG Bug reporting form <noreply@postgresql.org>
  2018-01-15 07:36 ` BUG #15010: Sequence ID is getting skipped David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2018-01-15 06:43 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: anilkumar.gv@gmail.com

The following bug has been logged on the website:

Bug reference:      15010
Logged by:          Anil Kumar G V
Email address:      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. 

  Column     |  Type   |        Value         
---------------+---------+----------------------
 sequence_name | name    | audit_logid_sequence
 last_value    | bigint  | 425585242
 start_value   | bigint  | 1
 increment_by  | bigint  | 1
 max_value     | bigint  | 9223372036854775807
 min_value     | bigint  | 1
 cache_value   | bigint  | 1
 log_cnt       | bigint  | 24
 is_cycled     | boolean | f
 is_called     | boolean | t


      Sequence "nmc.mrno_number_seq"
    Column     |  Type   |        Value        
---------------+---------+---------------------
 sequence_name | name    | mrno_number_seq
 last_value    | bigint  | 12
 start_value   | bigint  | 1
 increment_by  | bigint  | 1
 max_value     | bigint  | 9223372036854775807
 min_value     | bigint  | 1
 cache_value   | bigint  | 1
 log_cnt       | bigint  | 0
 is_cycled     | boolean | f
 is_called     | boolean | t





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* BUG #15010: Sequence ID is getting skipped
  2018-01-15 06:43 BUG #15010: Sequence ID is getting skipped PG Bug reporting form <noreply@postgresql.org>
@ 2018-01-15 07:36 ` David G. Johnston <david.g.johnston@gmail.com>
  2018-01-15 08:45   ` Re: BUG #15010: Sequence ID is getting skipped Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 1 reply; 3+ messages in thread

From: David G. Johnston @ 2018-01-15 07:36 UTC (permalink / raw)
  To: anilkumar.gv@gmail.com <anilkumar.gv@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

On Sunday, January 14, 2018, PG Bug reporting form <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
> 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 I think) but sequences are not
promised to be gap-less.

David J.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #15010: Sequence ID is getting skipped
  2018-01-15 06:43 BUG #15010: Sequence ID is getting skipped PG Bug reporting form <noreply@postgresql.org>
  2018-01-15 07:36 ` BUG #15010: Sequence ID is getting skipped David G. Johnston <david.g.johnston@gmail.com>
@ 2018-01-15 08:45   ` Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 0 replies; 3+ messages in thread

From: Daniel Gustafsson @ 2018-01-15 08:45 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: anilkumar.gv@gmail.com <anilkumar.gv@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

> 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 I think) 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-01-15 08:45 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-15 06:43 BUG #15010: Sequence ID is getting skipped PG Bug reporting form <noreply@postgresql.org>
2018-01-15 07:36 ` David G. Johnston <david.g.johnston@gmail.com>
2018-01-15 08:45   ` Daniel Gustafsson <daniel@yesql.se>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox