Book Contents

Book Index

Next Topic

Home

MARK_DESIGN_KSAFE

Use MARK_DESIGN_KSAFE to enable or disable automatic recovery in case of a failure. Before enabling automatic recovery, MARK_DESIGN_KSAFE queries the catalog to determine whether or not a cluster's physical schema design meets the following requirements:

Syntax

SELECT MARK_DESIGN_KSAFE(k)

Semantics

 

k

1 enables automatic recovery if the schema design meets requirements

0 disables automatic recovery

If you specify a k value of one (1), Vertica returns one of the following messages:

Marked design 1-safe

or

The schema does not meet requirements for K=1.

Fact table projection projection-name

has insufficient "buddy" projections..

The database's internal automatic recovery state persists across database restarts but is not checked at startup time.

To illustrate, consider the following sequence of events:

  1. Your database has automatic recovery enabled.
  2. You drop a table (and corresponding projections) in a running database.
  3. You forget to MARK_DESIGN_KSAFE(0).
  4. You shut down the database.
  5. You start the database with automatic recovery enabled.
  6. Recovery fails because the physical schema design no longer meets requirements.

Notes

Examples

> SELECT MARK_DESIGN_KSAFE(1);

mark_design_ksafe

----------------------

Marked design 1-safe

(1 row)

If the physical schema design is not K-safe, messages indicate which projections do not have a buddy:

> SELECT MARK_DESIGN_KSAFE(1);

The given K value is not correct; the schema is 0-safe

Projection pp1 has 0 buddies, which is smaller that the given K of 1

Projection pp2 has 0 buddies, which is smaller that the given K of 1

(1 row)