Fix build, fix arcadia

This commit is contained in:
kssenii 2021-02-18 06:06:37 +00:00
parent 46dd137a5a
commit 1480e95179
13 changed files with 46 additions and 12 deletions

View File

@ -14,8 +14,6 @@
#include <boost/algorithm/string/trim.hpp>
#include <pqxx/pqxx>
#include <common/logger_useful.h>
namespace DB
{

View File

@ -1,9 +1,6 @@
#if !defined(ARCADIA_BUILD)
#include "config_core.h"
#endif
#include <Storages/PostgreSQL/PostgreSQLConnection.h>
#if USE_LIBPQXX
#include <Storages/PostgreSQL/PostgreSQLConnection.h>
#include <IO/WriteBufferFromString.h>
#include <IO/Operators.h>

View File

@ -1,4 +1,6 @@
#include "PostgreSQLReplicaConsumer.h"
#if USE_LIBPQXX
#include "StoragePostgreSQLReplica.h"
#include <Columns/ColumnNullable.h>
@ -526,4 +528,4 @@ bool PostgreSQLReplicaConsumer::readFromReplicationSlot()
}
#endif

View File

@ -1,15 +1,20 @@
#pragma once
#if !defined(ARCADIA_BUILD)
#include "config_core.h"
#endif
#if USE_LIBPQXX
#include "PostgreSQLConnection.h"
#include "PostgreSQLReplicaMetadata.h"
#include "pqxx/pqxx"
#include "insertPostgreSQLValue.h"
#include <Core/BackgroundSchedulePool.h>
#include <common/logger_useful.h>
#include <Storages/IStorage.h>
#include <Storages/PostgreSQL/insertPostgreSQLValue.h>
#include <DataStreams/OneBlockInputStream.h>
#include <Parsers/ASTExpressionList.h>
#include "pqxx/pqxx" // Y_IGNORE
namespace DB
@ -118,3 +123,4 @@ private:
}
#endif

View File

@ -1,5 +1,6 @@
#include "PostgreSQLReplicaMetadata.h"
#if USE_LIBPQXX
#include <Poco/File.h>
#include <IO/WriteHelpers.h>
#include <IO/ReadHelpers.h>
@ -95,3 +96,5 @@ void PostgreSQLReplicaMetadata::commitMetadata(std::string & lsn, const std::fun
}
}
#endif

View File

@ -10,7 +10,7 @@ class PostgreSQLReplicaMetadata
public:
PostgreSQLReplicaMetadata(const std::string & metadata_file_path);
void commitMetadata(std::string & lsn, const std::function<String()> & syncTableFunc);
void commitMetadata(std::string & lsn, const std::function<String()> & finalizeStreamFunc);
void readMetadata();

View File

@ -1,4 +1,6 @@
#include "PostgreSQLReplicaSettings.h"
#if USE_LIBPQXX
#include <Parsers/ASTCreateQuery.h>
#include <Parsers/ASTSetQuery.h>
#include <Parsers/ASTFunction.h>
@ -37,4 +39,7 @@ void PostgreSQLReplicaSettings::loadFromQuery(ASTStorage & storage_def)
storage_def.set(storage_def.settings, settings_ast);
}
}
}
#endif

View File

@ -1,7 +1,13 @@
#pragma once
#if !defined(ARCADIA_BUILD)
#include "config_core.h"
#endif
#if USE_LIBPQXX
#include <Core/BaseSettings.h>
namespace DB
{
class ASTStorage;
@ -19,3 +25,5 @@ struct PostgreSQLReplicaSettings : public BaseSettings<PostgreSQLReplicaSettings
};
}
#endif

View File

@ -1,5 +1,6 @@
#include "PostgreSQLReplicationHandler.h"
#if USE_LIBPQXX
#include <DataStreams/PostgreSQLBlockInputStream.h>
#include <Databases/PostgreSQL/fetchPostgreSQLTableStructure.h>
#include <Storages/PostgreSQL/StoragePostgreSQLReplica.h>
@ -342,3 +343,5 @@ PostgreSQLTableStructure PostgreSQLReplicationHandler::fetchTableStructure(
}
}
#endif

View File

@ -1,5 +1,10 @@
#pragma once
#if !defined(ARCADIA_BUILD)
#include "config_core.h"
#endif
#if USE_LIBPQXX
#include "PostgreSQLConnection.h"
#include "PostgreSQLReplicaConsumer.h"
#include "PostgreSQLReplicaMetadata.h"
@ -75,6 +80,7 @@ private:
std::unordered_map<String, StoragePtr> nested_storages;
};
}
#endif

View File

@ -1,5 +1,6 @@
#include "StoragePostgreSQLReplica.h"
#if USE_LIBPQXX
#include <Common/Macros.h>
#include <Core/Settings.h>
#include <Common/parseAddress.h>
@ -495,3 +496,4 @@ void registerStoragePostgreSQLReplica(StorageFactory & factory)
}
#endif

View File

@ -1,7 +1,10 @@
#pragma once
#if !defined(ARCADIA_BUILD)
#include "config_core.h"
#endif
#if USE_LIBPQXX
#include "PostgreSQLReplicationHandler.h"
#include "PostgreSQLReplicaSettings.h"
@ -100,3 +103,4 @@ private:
}
#endif

View File

@ -4,7 +4,7 @@
#include <DataStreams/IBlockInputStream.h>
#include <Core/ExternalResultDescription.h>
#include <Core/Field.h>
#include <pqxx/pqxx>
#include <pqxx/pqxx> // Y_IGNORE
namespace DB