Change in ovirt-engine[master]: core: Upgrade should set SEQUENCE number to the correct valu...

emesika at redhat.com emesika at redhat.com
Sun Jan 20 10:55:56 UTC 2013


Eli Mesika has submitted this change and it was merged.

Change subject: core: Upgrade should set SEQUENCE number to the correct value
......................................................................


core: Upgrade should set SEQUENCE number to the correct value

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.

for more details , see:
http://www.postgresql.org/docs/8.4/static/sql-createsequence.html

Change-Id: Icd774770cbdbf197736a547de901826bdbec7abc
Signed-off-by: Eli Mesika <emesika at redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=896552
---
M backend/manager/dbscripts/dbfunctions.sh
A backend/manager/dbscripts/update_sequence_numbers.sql
2 files changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Eli Mesika: Verified; Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/11153
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd774770cbdbf197736a547de901826bdbec7abc
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>



More information about the Engine-commits mailing list