mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-29 21:20:49 +00:00
Remove initial filling
This commit is contained in:
parent
9057aad798
commit
a0f717619c
@ -19,7 +19,6 @@ PostgreSQLConnectionPool::PostgreSQLConnectionPool(
|
||||
{
|
||||
address = host + ':' + std::to_string(port);
|
||||
connection_str = formatConnectionString(std::move(dbname), std::move(host), port, std::move(user), std::move(password));
|
||||
initialize();
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +27,6 @@ PostgreSQLConnectionPool::PostgreSQLConnectionPool(const PostgreSQLConnectionPoo
|
||||
, connection_str(other.connection_str)
|
||||
, address(other.address)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
|
||||
@ -45,14 +43,6 @@ std::string PostgreSQLConnectionPool::formatConnectionString(
|
||||
}
|
||||
|
||||
|
||||
void PostgreSQLConnectionPool::initialize()
|
||||
{
|
||||
/// No connection is made, just fill pool with non-connected connection objects.
|
||||
for (size_t i = 0; i < POSTGRESQL_POOL_DEFAULT_SIZE; ++i)
|
||||
pool->push(std::make_shared<PostgreSQLConnection>(connection_str, address));
|
||||
}
|
||||
|
||||
|
||||
PostgreSQLConnectionHolderPtr PostgreSQLConnectionPool::get()
|
||||
{
|
||||
PostgreSQLConnectionPtr connection;
|
||||
|
@ -41,8 +41,6 @@ private:
|
||||
static std::string formatConnectionString(
|
||||
std::string dbname, std::string host, UInt16 port, std::string user, std::string password);
|
||||
|
||||
void initialize();
|
||||
|
||||
PoolPtr pool;
|
||||
std::string connection_str, address;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user