Sequence Current Value Resetting

Поиск
Список
Период
Сортировка
От Douglas Doolittle
Тема Sequence Current Value Resetting
Дата
Msg-id AA9E9C9ACAFCA545A33A9F6E1E88353E546BFE@titus.nmi.northlandministries.org
обсуждение исходный текст
Ответы Re: Sequence Current Value Resetting  (John DeSoi <desoi@pgedit.com>)
Список pgsql-novice

Twice a year we import class information into table class.  My first time doing this was with the spring import in August and the import failed because the Current Value was less than the Max ID in the table.  I changed the Current Value to the Max ID and was able to do the import.  After the import, the new Current Value matched the Max ID and I thought I had solved my problem.  I did not expect any problem today when I when to do the fall import.  I was unable to do the import and discovered that the Current Value was 156 less than the Max ID.  I advanced the current value to 21557, was able to import 276 rows, and the current value properly became 21832.  Any thoughts as to why this value keeps “slipping?”  Thanks.

 

Property                                    Value

-----                                           -----

Name                                        tblclass_classid_seq

OID                                           23937

Owner                                       dbdevel

ACL                                          (dbdevel=awrdRxt/dbdevel,jboss=arwd/dbdevel)

Current Value                            21832

Minimum                                   1

Maximum                                  9223372036854775807

Increment                                  1

Cache                                       1

Cycled                                      No

System sequence?                    No

Comment                     

 

-- Sequence: tblclass_classid_seq

 

-- DROP SEQUENCE tblclass_classid_seq;

 

CREATE SEQUENCE tblclass_classid_seq

  INCREMENT 1

  MINVALUE 1

  MAXVALUE 9223372036854775807

  START 21832

  CACHE 1;

ALTER TABLE tblclass_classid_seq OWNER TO dbdevel;

GRANT ALL ON TABLE tblclass_classid_seq TO dbdevel;

GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE tblclass_classid_seq TO jboss;

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

Предыдущее
От: "Pazargic Antonel Ernest"
Дата:
Сообщение: Partitioning table - explain said that all partition tables are scanned
Следующее
От: "Winson Yung"
Дата:
Сообщение: how to encrypt trigger function