8#include <userver/components/component_base.hpp>
9#include <userver/concurrent/async_event_source.hpp>
10#include <userver/dynamic_config/snapshot.hpp>
11#include <userver/engine/mutex.hpp>
12#include <userver/utils/statistics/entry.hpp>
14#include <userver/storages/postgres/database.hpp>
16USERVER_NAMESPACE_BEGIN
147 std::chrono::milliseconds{500},
148 std::chrono::milliseconds{250}
152 Postgres(
const ComponentConfig&,
const ComponentContext&);
171 static yaml_config::Schema GetStaticConfigSchema();
174 void OnConfigUpdate(
const dynamic_config::Snapshot& cfg);
177 std::string db_name_;
179 storages::
postgres::DatabasePtr database_;
183 concurrent::AsyncEventSubscriberScope config_subscription_;
184 utils::statistics::Entry statistics_holder_;
188inline constexpr bool kHasValidate<Postgres> =
true;