Red Hat Bugzilla – Bug 896552
Upgrade should set SEQUENCE number to the correct value.
Last modified: 2016-02-10 14:43:06 EST
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):
Sometimes (hard to reproduce)
Steps to Reproduce:
We must validate correct SEQUENCE numbers in pre-upgrade step
Update the sequence value after a COPY FROM:
COPY distributors FROM 'input_file';
SELECT setval('serial', max(id)) FROM distributors;
fixed in commit: f3d3f85
3.2 has been released