Description of problem: Table sequences may get out of sync after database is restored. We had that in a customer database, the sequence value for generating option_id for vdc_options was 238 while the max(option_id) was 399. That resulted of course with PK violation. Version-Release number of selected component (if applicable): How reproducible: Sometimes (hard to reproduce) Steps to Reproduce: 1. 2. 3. Actual results: PK violation Expected results: We must validate correct SEQUENCE numbers in pre-upgrade step Additional info: http://www.postgresql.org/docs/8.4/static/sql-createsequence.html Update the sequence value after a COPY FROM: BEGIN; COPY distributors FROM 'input_file'; SELECT setval('serial', max(id)) FROM distributors; END;
http://gerrit.ovirt.org/#/c/11153/
fixed in commit: f3d3f85
3.2 has been released