Search Postgresql Archives

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

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

 



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 value was around 65k, but the max id in the database was around 160k.  everything works now that i've restarted it, but I can'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






[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