Search Postgresql Archives

Re: sequence skips 30 values, how?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



am  Wed, dem 31.01.2007, um  7:43:05 -0500 mailte Geoffrey folgendes:
> dies.  We've tracked this to an unusual situation where a sequence value 
> that is being created during the process that is causing the core file 
> generation.  The thing that is bizarre is that the sequence value skips 
> 30+ entries.
> 
> How is this even possible?  Any suggestions would be greatly appreciated.

A sequence don't guaranteed a gapless behavior.

Simple example:

test=# create table gap (id serial);
NOTICE:  CREATE TABLE will create implicit sequence "gap_id_seq" for
serial column "gap.id"
CREATE TABLE
test=*# insert into gap values (default)
test-# ;
INSERT 0 1
test=*# commit;
COMMIT
test=# insert into gap values (default);
INSERT 0 1
test=*# insert into gap values (default);
INSERT 0 1
test=*# rollback;
ROLLBACK
test=# insert into gap values (default);
INSERT 0 1
test=*# commit;
COMMIT
test=# select * from gap;
 id
----
  1
  4
(2 rows)


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux