mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
Fixes
This commit is contained in:
parent
12f98e8b11
commit
f7361250b2
@ -42,13 +42,6 @@ ConnectionPtr createReplicationConnection(const ConnectionInfo & connection_info
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
std::shared_ptr<T> createTransaction(pqxx::connection & connection)
|
|
||||||
{
|
|
||||||
return std::make_shared<T>(connection);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Connection::Connection(const ConnectionInfo & connection_info_)
|
Connection::Connection(const ConnectionInfo & connection_info_)
|
||||||
: connection_info(connection_info_)
|
: connection_info(connection_info_)
|
||||||
{
|
{
|
||||||
|
@ -61,11 +61,10 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// Passes transaction object into PostgreSQLBlockInputStream and does not close transaction after read if finished.
|
/// Passes transaction object into PostgreSQLBlockInputStream and does not close transaction after read is finished.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class PostgreSQLTransactionBlockInputStream : public PostgreSQLBlockInputStream<T>
|
class PostgreSQLTransactionBlockInputStream : public PostgreSQLBlockInputStream<T>
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using Base = PostgreSQLBlockInputStream<T>;
|
using Base = PostgreSQLBlockInputStream<T>;
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@ namespace DB
|
|||||||
static const auto reschedule_ms = 500;
|
static const auto reschedule_ms = 500;
|
||||||
|
|
||||||
|
|
||||||
|
/// TODO: fetch replica identity index
|
||||||
|
|
||||||
PostgreSQLReplicationHandler::PostgreSQLReplicationHandler(
|
PostgreSQLReplicationHandler::PostgreSQLReplicationHandler(
|
||||||
const std::string & database_name_,
|
const std::string & database_name_,
|
||||||
const postgres::ConnectionInfo & connection_info_,
|
const postgres::ConnectionInfo & connection_info_,
|
||||||
@ -279,9 +281,8 @@ bool PostgreSQLReplicationHandler::isReplicationSlotExist(pqxx::nontransaction &
|
|||||||
if (result.empty())
|
if (result.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool is_active = result[0][0].as<bool>();
|
|
||||||
LOG_TRACE(log, "Replication slot {} already exists (active: {}). Restart lsn position is {}",
|
LOG_TRACE(log, "Replication slot {} already exists (active: {}). Restart lsn position is {}",
|
||||||
slot_name, is_active, result[0][0].as<std::string>());
|
slot_name, result[0][0].as<bool>(), result[0][0].as<std::string>());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,6 @@ StorageMaterializePostgreSQL::StorageMaterializePostgreSQL(
|
|||||||
, nested_storage(nested_storage_)
|
, nested_storage(nested_storage_)
|
||||||
, is_postgresql_replica_database(true)
|
, is_postgresql_replica_database(true)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user