I'm not sure about the naming inconsistency here between "db" and "kvstore".  Consider "KVSTORE_BACKEND"?  It is pretty long-winded though...