diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 517e6cf89dd..eea8e852ada 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -1200,9 +1200,9 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, if (!create.attach && getContext()->getSettingsRef().database_replicated_allow_only_replicated_engine) { bool is_replicated_storage = typeid_cast(res.get()) != nullptr; - if (!is_replicated_storage && database && database->getEngineName() != "Replicated") + if (!is_replicated_storage && res->storesDataOnDisk() && database && database->getEngineName() != "Replicated") throw Exception(ErrorCodes::UNKNOWN_STORAGE, - "Only Replicated tables are allowed in database engine is Replicated"); + "Only table with Replicated engine or tables which does not store data on disk are allowed in Replicated database"); } if (from_path && !res->storesDataOnDisk())