9#include <userver/components/loggable_component_base.hpp>
10#include <userver/concurrent/async_event_source.hpp>
11#include <userver/dynamic_config/snapshot.hpp>
12#include <userver/engine/mutex.hpp>
13#include <userver/utils/statistics/entry.hpp>
15#include <userver/storages/postgres/database.hpp>
17USERVER_NAMESPACE_BEGIN
139 static constexpr auto kDefaultMaxReplicationLag = std::chrono::seconds{60};
144 std::chrono::milliseconds{500},
145 std::chrono::milliseconds{250}
149 Postgres(
const ComponentConfig&,
const ComponentContext&);
168 static yaml_config::Schema GetStaticConfigSchema();
171 void OnConfigUpdate(
const dynamic_config::Snapshot& cfg);
173 concurrent::AsyncEventSubscriberScope config_subscription_;
175 utils::statistics::Entry statistics_holder_;
178 std::string db_name_;
180 storages::
postgres::DatabasePtr database_;
184inline constexpr bool kHasValidate<Postgres> =
true;