DatabaseCatalog::getTable() should also wait

This commit is contained in:
serxa 2023-11-02 17:07:21 +00:00
parent 1fe344ca45
commit c1c390348e

View File

@ -349,6 +349,9 @@ DatabaseAndTable DatabaseCatalog::getTableImpl(
return {}; return {};
} }
/// Wait for table to be started because we are going to return StoragePtr
db_and_table.first->waitTableStarted(table_id.getTableName());
#if USE_LIBPQXX #if USE_LIBPQXX
if (!context_->isInternalQuery() && (db_and_table.first->getEngineName() == "MaterializedPostgreSQL")) if (!context_->isInternalQuery() && (db_and_table.first->getEngineName() == "MaterializedPostgreSQL"))
{ {