Skip to main content

WARNING 6046: The database is currently 0-safe, which could result in catastrophic data loss in the

  • September 4, 2014
  • 1 reply
  • 7 views

Sunny_1
Forum|alt.badge.img
WARNING 6046: The database is currently 0-safe, which could result in catastrophic data loss in the event of a failure. Do not use k=0 in a production environment. For test, dev or other non-production environments, K=0 may be acceptable however Vertica still recommends a minimum value of K=1

Admintools dispaly this message on a three node cluster.  
restart policy is set to  (k SAFE) . How can i change it from k 0 to k=1

Can some explain what is going on here, three node cluster should be K safe and any one of them can go down and we should still be able to run two nodes while we bring the third one up. But it appears that i not the case from the error message posted above.

1 reply

Navin_C
Forum|alt.badge.img+2
  • Participating Frequently
  • September 4, 2014
Hi Sunny,

K safety factor is implemented on database level. Its a database property and not a cluster property.
If you have two databases existing on same cluster, one can have k-safety as 1 and other can have k-safety as 0
k-safety is implemented while creating databases. If you have created a database from admintools, at the time of creation, it will ask you db_name --> password --> k-safety value(0/1/2) in this sequence.

It seems you have kept the k-safety value as 0 at the time of database creation, so you are getting this warning.
If I am not wrong this warning must popup every time you log into vsql tool.

Its not that the database will function improper if k-safety is 0, it only that, if a node goes down out of three nodes then your database will go down.

Actually it not a thumb rule or any default, that a 3 node cluster will be k-safe 1, it will always be k-safe 0 for a database by default unless you specify a database to be k-safe 1 at creation time.

How do we make it K-safe 1 after database is deployed:

you can use vertica function

MARK_DESIGN_KSAFE

A few notes about this function:
1. Lets say you had a table when database was k=0 , so there was one copy of data on all nodes and there were no buddy projections . Suppose you run the above function, the function will fail giving error message saying this projection does does not qualify with k=1 as it does not have a buddy projection and so the database cannot be set to k=1.
2. This function does not change the existing schema of database top qualify for k=1

Hope this helps.
NC