Skip to main content

data loss after drop of identity column

  • January 8, 2018
  • 4 replies
  • 10 views

Francois
Forum|alt.badge.img+1

Hi all

A community user have observed a data loss after drop of an identity column (table empty after cmd alter table ... drop column ... on identity column, easy to reproduce)

Does any of you have already face this issue ?
Short term solution could be to use sequence instead of identity - any comment ?

Regards
Francois

4 replies

marcothesane
Forum|alt.badge.img+1
  • Participating Frequently
  • January 8, 2018

Salut François -

In fact, I just tried it - and ran into the same issue.

People usually don't run into that because the column declared as IDENTITY is usually at least a unique key, if not the primary key, and is part of the ORDER BY clause or the segmentation criteria of the most important projections, and therefore not droppable at all. I had to create a most unusual scenario to trigger the effect.

Workaround, as you say, is an explicit sequence, and defaulting the concerned column to <sequence_name>.nextval .

Cheers -
Marco


Jim_Knicely
Forum|alt.badge.img+2
  • Participating Frequently
  • January 8, 2018

Yikes! I opened a Jira for this issue: VER-59818

http://jira.verticacorp.com:8080/jira/browse/VER-59818


Jim_Knicely
Forum|alt.badge.img+2
  • Participating Frequently
  • January 8, 2018

@Francois - Do you know which version of Vertica the client is using? I tested on 9.0.1-0 and this bug is there.


Francois
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • January 9, 2018

@Jim_Knicely - client is using CE 8.0.0
Thanks for you help
Happy new year to all