Projection XXX cannot be dropped because K-safety ...

Moderator: NorbertKrupa

Post Reply
hopewell
Beginner
Beginner
Posts: 29
Joined: Wed Mar 27, 2013 10:39 pm

Projection XXX cannot be dropped because K-safety ...

Post by hopewell » Mon Jan 13, 2014 5:57 pm

What does the error "Projection XXX cannot be dropped because K-safety would be violated" mean in Vertica?

Code: Select all

dbadmin=> drop projection salesforce_b0;
ROLLBACK 4455:  Projection salesforce_b0 cannot be dropped because K-safety would be violated
DETAIL:  Current K-safety value = 1
HINT:  Use mark_design_ksafe() to decrement K-safety value
Is it safe to temporarily lower the k-saftey to 0 to perform the drop?

Steve Sarsfield
Newbie
Newbie
Posts: 2
Joined: Mon Jan 13, 2014 7:46 pm

Re: Projection XXX cannot be dropped because K-safety ...

Post by Steve Sarsfield » Mon Jan 13, 2014 9:19 pm

k-safety refers to the fact that all data is replicated on multiple nodes so that node failures can be tolerated by the system without interrupting functionality. It allows Vertica to automatically adapt to on the fly the addition or removal of database nodes.

scutter
Master
Master
Posts: 302
Joined: Tue Aug 07, 2012 2:15 am

Re: Projection XXX cannot be dropped because K-safety ...

Post by scutter » Mon Jan 13, 2014 9:54 pm

This error typically occurs when you try to drop one out of a pair of projections. If you are really intending to drop both projections then drop them both in one statement:

drop projection salesforce_b0, salesforce_b1;

If these are your last super-projections for this table, and you really want to drop the entire table, then do:

drop table salesforce cascade;

—Sharon
Sharon Cutter
Vertica Consultant, Zazz Technologies LLC

hopewell
Beginner
Beginner
Posts: 29
Joined: Wed Mar 27, 2013 10:39 pm

Re: Projection XXX cannot be dropped because K-safety ...

Post by hopewell » Tue Jan 14, 2014 2:53 am

Sharon,

Thank you! I was able to drop the projections per your advice :D

Post Reply

Return to “New to Vertica”