inserts failed because of primary key conflict, weird sequence issue. what could cause a reset?

Поиск
Список
Период
Сортировка
От jonathan vanasco
Тема inserts failed because of primary key conflict, weird sequence issue. what could cause a reset?
Дата
Msg-id 0C538715-CC56-46B2-8E8B-0A565FBE92D2@2xlp.com
обсуждение исходный текст
Ответы Re: inserts failed because of primary key conflict, weird sequenceissue. what could cause a reset?  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
I can't figure out how this happened

I have table where the primary key is a sequence.  I was getting a lot of errors on insertions, and noticed the current
valuewas around 65k, but the max id in the database was around 160k.  everything works now that i've restarted it, but
Ican't find any record of a restart sequence accidentally being put in. 

the only thing I can think of, is the sequence went up several hundred billion and restarted from 0 when a drive
crashed.but that seems incredibly unlikely given the last known actual max id. 

does anyone have an idea what could cause this?  pg 9.6.6 on ubuntu



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

Предыдущее
От: Mark Fletcher
Дата:
Сообщение: Logical replication blocking alter/drop
Следующее
От: Yogesh Sharma
Дата:
Сообщение: Re: Size of pg_multixact/members increases 11355