| 53 | static const auto reschedule_error_multiplier = 10; |
| 54 | |
| 55 | DatabasePostgreSQL::DatabasePostgreSQL( |
| 56 | ContextPtr context_, |
| 57 | const String & metadata_path_, |
| 58 | const ASTStorage * database_engine_define_, |
| 59 | const String & dbname_, |
| 60 | const StoragePostgreSQL::Configuration & configuration_, |
| 61 | postgres::PoolWithFailoverPtr pool_, |
| 62 | bool cache_tables_, |
| 63 | UUID uuid) |
| 64 | : DatabaseWithAltersOnDiskBase(dbname_) |
| 65 | , WithContext(context_->getGlobalContext()) |
| 66 | , metadata_path(metadata_path_) |
| 67 | , database_engine_define(database_engine_define_->clone()) |
| 68 | , configuration(configuration_) |
| 69 | , pool(std::move(pool_)) |
| 70 | , cache_tables(cache_tables_) |
| 71 | , log(getLogger("DatabasePostgreSQL(" + dbname_ + ")")) |
| 72 | , db_uuid(uuid) |
| 73 | { |
| 74 | persistent = !context_->getClientInfo().is_shared_catalog_internal; |
| 75 | if (persistent) |
| 76 | { |
| 77 | auto db_disk = getDisk(); |
| 78 | db_disk->createDirectories(metadata_path); |
| 79 | } |
| 80 | |
| 81 | cleaner_task = getContext()->getSchedulePool().createTask(StorageID::createEmpty(), "PostgreSQLCleanerTask", [this]{ removeOutdatedTables(); }); |
| 82 | cleaner_task->deactivate(); |
| 83 | } |
| 84 | |
| 85 | |
| 86 | String DatabasePostgreSQL::getTableNameForLogs(const String & table_name) const |
nothing calls this directly
no test coverage detected