ClickHouse / ClickHouse

ClickHouse® is a real-time analytics DBMS
https://clickhouse.com
Apache License 2.0
37.43k stars 6.89k forks source link

Fatal error while attaching table with MaterializedPostgreSQL #62711

Open erwannbst opened 6 months ago

erwannbst commented 6 months ago

Describe what's wrong

Hello, following another issue I tried another approach to avoid the problem : Add only small tables to the replication and then attaching one by one the heavier ones.

Here is the base request :

SET allow_experimental_database_materialized_postgresql=1;
CREATE DATABASE IF NOT EXISTS database_materialized
ENGINE = MaterializedPostgreSQL('localhost:6666', 'user', 'postgres', 'passwd')
SETTINGS materialized_postgresql_tables_list = 'table1,table2,table3,table4'

It works well, then I add one by one heavy tables (~150 000 000 rows) with : attach table database_materialized.table_xx

At the 5th one, it crashes with this fatal error at the end of the execution:

2024.04.17 08:20:31.144522 [ 50 ] {} <Error> ServerErrorHandler: Code: 101. DB::NetException: Unexpected packet from client (expected Hello, got 22). (UNEXPECTED_PACKET_FROM_CLIENT), Stack trace (when copying this message, always include the lines below):

0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000cbcedbb
1. DB::NetException::NetException<unsigned long&>(int, FormatStringHelperImpl<std::type_identity<unsigned long&>::type>, unsigned long&) @ 0x0000000012367cad
2. DB::TCPHandler::receiveHello() @ 0x000000001235edbd
3. DB::TCPHandler::runImpl() @ 0x0000000012350555
4. DB::TCPHandler::run() @ 0x000000001236d099
5. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
6. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
7. Poco::PooledThread::run() @ 0x0000000014d954a1
8. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
9. ? @ 0x00007f8487952609
10. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.983993 [ 47 ] {} <Fatal> BaseDaemon: (version 24.3.2.23 (official build), build id: DA47C8C3B6BA55C4A326D4DD33ACED2DFEA5DA96, git hash: 8b7d910960cc2c6a0db07991fe2576a67fe98146) (from thread 48) Terminate called for uncaught exception:
2024.04.17 08:48:48.984041 [ 47 ] {} <Fatal> BaseDaemon: std::exception. Code: 1001, type: pqxx::sql_error, e.what() = ERROR:  replication slot "database_tmp" does not exist
, Stack trace (when copying this message, always include the lines below):

0. pqxx::sql_error::sql_error(String const&, String const&, char const*) @ 0x0000000016e35ba3
1. pqxx::result::throw_sql_error(String const&, String const&) const @ 0x0000000016e36e7e
2. pqxx::result::check_status(std::basic_string_view<char, std::char_traits<char>>) const @ 0x0000000016e37339
3. pqxx::connection::make_result(pg_result*, std::shared_ptr<String> const&, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e30cb5
4. pqxx::connection::exec(std::shared_ptr<String>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e32a98
5. pqxx::transaction_base::exec(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e3ef64
6. DB::PostgreSQLReplicationHandler::dropReplicationSlot(pqxx::nontransaction&, bool) @ 0x000000001025c3ba
7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984090 [ 47 ] {} <Fatal> BaseDaemon: , Stack trace (when copying this message, always include the lines below):

0. pqxx::sql_error::sql_error(String const&, String const&, char const*) @ 0x0000000016e35ba3
1. pqxx::result::throw_sql_error(String const&, String const&) const @ 0x0000000016e36e7e
2. pqxx::result::check_status(std::basic_string_view<char, std::char_traits<char>>) const @ 0x0000000016e37339
3. pqxx::connection::make_result(pg_result*, std::shared_ptr<String> const&, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e30cb5
4. pqxx::connection::exec(std::shared_ptr<String>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e32a98
5. pqxx::transaction_base::exec(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e3ef64
6. DB::PostgreSQLReplicationHandler::dropReplicationSlot(pqxx::nontransaction&, bool) @ 0x000000001025c3ba
7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984114 [ 47 ] {} <Fatal> BaseDaemon:
0. pqxx::sql_error::sql_error(String const&, String const&, char const*) @ 0x0000000016e35ba3
1. pqxx::result::throw_sql_error(String const&, String const&) const @ 0x0000000016e36e7e
2. pqxx::result::check_status(std::basic_string_view<char, std::char_traits<char>>) const @ 0x0000000016e37339
3. pqxx::connection::make_result(pg_result*, std::shared_ptr<String> const&, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e30cb5
4. pqxx::connection::exec(std::shared_ptr<String>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e32a98
5. pqxx::transaction_base::exec(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e3ef64
6. DB::PostgreSQLReplicationHandler::dropReplicationSlot(pqxx::nontransaction&, bool) @ 0x000000001025c3ba
7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984128 [ 47 ] {} <Fatal> BaseDaemon: 0. pqxx::sql_error::sql_error(String const&, String const&, char const*) @ 0x0000000016e35ba3
1. pqxx::result::throw_sql_error(String const&, String const&) const @ 0x0000000016e36e7e
2. pqxx::result::check_status(std::basic_string_view<char, std::char_traits<char>>) const @ 0x0000000016e37339
3. pqxx::connection::make_result(pg_result*, std::shared_ptr<String> const&, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e30cb5
4. pqxx::connection::exec(std::shared_ptr<String>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e32a98
5. pqxx::transaction_base::exec(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e3ef64
6. DB::PostgreSQLReplicationHandler::dropReplicationSlot(pqxx::nontransaction&, bool) @ 0x000000001025c3ba
7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984150 [ 47 ] {} <Fatal> BaseDaemon: 1. pqxx::result::throw_sql_error(String const&, String const&) const @ 0x0000000016e36e7e
2. pqxx::result::check_status(std::basic_string_view<char, std::char_traits<char>>) const @ 0x0000000016e37339
3. pqxx::connection::make_result(pg_result*, std::shared_ptr<String> const&, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e30cb5
4. pqxx::connection::exec(std::shared_ptr<String>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e32a98
5. pqxx::transaction_base::exec(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e3ef64
6. DB::PostgreSQLReplicationHandler::dropReplicationSlot(pqxx::nontransaction&, bool) @ 0x000000001025c3ba
7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984168 [ 47 ] {} <Fatal> BaseDaemon: 2. pqxx::result::check_status(std::basic_string_view<char, std::char_traits<char>>) const @ 0x0000000016e37339
3. pqxx::connection::make_result(pg_result*, std::shared_ptr<String> const&, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e30cb5
4. pqxx::connection::exec(std::shared_ptr<String>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e32a98
5. pqxx::transaction_base::exec(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e3ef64
6. DB::PostgreSQLReplicationHandler::dropReplicationSlot(pqxx::nontransaction&, bool) @ 0x000000001025c3ba
7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984188 [ 47 ] {} <Fatal> BaseDaemon: 3. pqxx::connection::make_result(pg_result*, std::shared_ptr<String> const&, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e30cb5
4. pqxx::connection::exec(std::shared_ptr<String>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e32a98
5. pqxx::transaction_base::exec(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e3ef64
6. DB::PostgreSQLReplicationHandler::dropReplicationSlot(pqxx::nontransaction&, bool) @ 0x000000001025c3ba
7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984207 [ 47 ] {} <Fatal> BaseDaemon: 4. pqxx::connection::exec(std::shared_ptr<String>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e32a98
5. pqxx::transaction_base::exec(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e3ef64
6. DB::PostgreSQLReplicationHandler::dropReplicationSlot(pqxx::nontransaction&, bool) @ 0x000000001025c3ba
7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984236 [ 47 ] {} <Fatal> BaseDaemon: 5. pqxx::transaction_base::exec(std::basic_string_view<char, std::char_traits<char>>, std::basic_string_view<char, std::char_traits<char>>) @ 0x0000000016e3ef64
6. DB::PostgreSQLReplicationHandler::dropReplicationSlot(pqxx::nontransaction&, bool) @ 0x000000001025c3ba
7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984267 [ 47 ] {} <Fatal> BaseDaemon: 6. DB::PostgreSQLReplicationHandler::dropReplicationSlot(pqxx::nontransaction&, bool) @ 0x000000001025c3ba
7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984297 [ 47 ] {} <Fatal> BaseDaemon: 7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010267445
8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984326 [ 47 ] {} <Fatal> BaseDaemon: 8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984352 [ 47 ] {} <Fatal> BaseDaemon: 9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984366 [ 47 ] {} <Fatal> BaseDaemon: 10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984385 [ 47 ] {} <Fatal> BaseDaemon: 11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984404 [ 47 ] {} <Fatal> BaseDaemon: 12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984431 [ 47 ] {} <Fatal> BaseDaemon: 13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984474 [ 47 ] {} <Fatal> BaseDaemon: 14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984499 [ 47 ] {} <Fatal> BaseDaemon: 15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984523 [ 47 ] {} <Fatal> BaseDaemon: 16. DB::TCPHandler::run() @ 0x000000001236d099
17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984552 [ 47 ] {} <Fatal> BaseDaemon: 17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984573 [ 47 ] {} <Fatal> BaseDaemon: 18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984591 [ 47 ] {} <Fatal> BaseDaemon: 19. Poco::PooledThread::run() @ 0x0000000014d954a1
20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984617 [ 47 ] {} <Fatal> BaseDaemon: 20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984634 [ 47 ] {} <Fatal> BaseDaemon: 21. ? @ 0x00007f8487952609
22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984649 [ 47 ] {} <Fatal> BaseDaemon: 22. ? @ 0x00007f8487877353
 (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984666 [ 47 ] {} <Fatal> BaseDaemon:  (version 24.3.2.23 (official build))
2024.04.17 08:48:48.984833 [ 767 ] {} <Fatal> BaseDaemon: ########## Short fault info ############
2024.04.17 08:48:48.984869 [ 767 ] {} <Fatal> BaseDaemon: (version 24.3.2.23 (official build), build id: DA47C8C3B6BA55C4A326D4DD33ACED2DFEA5DA96, git hash: 8b7d910960cc2c6a0db07991fe2576a67fe98146) (from thread 48) Received signal 6
2024.04.17 08:48:48.984892 [ 767 ] {} <Fatal> BaseDaemon: Signal description: Aborted
2024.04.17 08:48:48.984902 [ 767 ] {} <Fatal> BaseDaemon:
2024.04.17 08:48:48.984923 [ 767 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007f848779b00b 0x00007f848777a859 0x000000000ce734ee 0x0000000017104303 0x00000000171042ef 0x00000000076592bb 0x0000000010268d3f 0x0000000010249bc6 0x0000000010248e40 0x0000000010b7e6e5 0x0000000010b73603 0x0000000010b842cf 0x00000000112705c2 0x000000001126bf9a 0x0000000012351d84 0x000000001236d099 0x0000000014c9bef2 0x0000000014c9cd39 0x0000000014d954a1 0x0000000014d93a3d 0x00007f8487952609 0x00007f8487877353
2024.04.17 08:48:48.984937 [ 767 ] {} <Fatal> BaseDaemon: ########################################
2024.04.17 08:48:48.985020 [ 767 ] {} <Fatal> BaseDaemon: (version 24.3.2.23 (official build), build id: DA47C8C3B6BA55C4A326D4DD33ACED2DFEA5DA96, git hash: 8b7d910960cc2c6a0db07991fe2576a67fe98146) (from thread 48) (query_id: 2ae3602e-bd6d-4094-9a70-5e6205dc6fd4) (query: attach table database_replication.table_xxx) Received signal Aborted (6)
2024.04.17 08:48:48.985061 [ 767 ] {} <Fatal> BaseDaemon:
2024.04.17 08:48:48.985098 [ 767 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007f848779b00b 0x00007f848777a859 0x000000000ce734ee 0x0000000017104303 0x00000000171042ef 0x00000000076592bb 0x0000000010268d3f 0x0000000010249bc6 0x0000000010248e40 0x0000000010b7e6e5 0x0000000010b73603 0x0000000010b842cf 0x00000000112705c2 0x000000001126bf9a 0x0000000012351d84 0x000000001236d099 0x0000000014c9bef2 0x0000000014c9cd39 0x0000000014d954a1 0x0000000014d93a3d 0x00007f8487952609 0x00007f8487877353
2024.04.17 08:48:48.985140 [ 767 ] {} <Fatal> BaseDaemon: 2. ? @ 0x00007f848779b00b
2024.04.17 08:48:48.985181 [ 767 ] {} <Fatal> BaseDaemon: 3. ? @ 0x00007f848777a859
2024.04.17 08:48:48.985245 [ 767 ] {} <Fatal> BaseDaemon: 4. terminate_handler() @ 0x000000000ce734ee
2024.04.17 08:48:48.985902 [ 767 ] {} <Fatal> BaseDaemon: 5. std::__terminate(void (*)()) @ 0x0000000017104303
2024.04.17 08:48:48.985958 [ 767 ] {} <Fatal> BaseDaemon: 6. std::terminate() @ 0x00000000171042ef
2024.04.17 08:48:48.986016 [ 767 ] {} <Fatal> BaseDaemon: 7. ? @ 0x00000000076592bb
2024.04.17 08:48:48.986074 [ 767 ] {} <Fatal> BaseDaemon: 8. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010268d3f
2024.04.17 08:48:48.986125 [ 767 ] {} <Fatal> BaseDaemon: 9. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
2024.04.17 08:48:48.986186 [ 767 ] {} <Fatal> BaseDaemon: 10. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
2024.04.17 08:48:48.986241 [ 767 ] {} <Fatal> BaseDaemon: 11. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
2024.04.17 08:48:48.986299 [ 767 ] {} <Fatal> BaseDaemon: 12. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
2024.04.17 08:48:48.986349 [ 767 ] {} <Fatal> BaseDaemon: 13. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
2024.04.17 08:48:48.986392 [ 767 ] {} <Fatal> BaseDaemon: 14. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
2024.04.17 08:48:48.986460 [ 767 ] {} <Fatal> BaseDaemon: 15. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
2024.04.17 08:48:48.986513 [ 767 ] {} <Fatal> BaseDaemon: 16. DB::TCPHandler::runImpl() @ 0x0000000012351d84
2024.04.17 08:48:48.986564 [ 767 ] {} <Fatal> BaseDaemon: 17. DB::TCPHandler::run() @ 0x000000001236d099
2024.04.17 08:48:48.986614 [ 767 ] {} <Fatal> BaseDaemon: 18. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
2024.04.17 08:48:48.986652 [ 767 ] {} <Fatal> BaseDaemon: 19. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
2024.04.17 08:48:48.986698 [ 767 ] {} <Fatal> BaseDaemon: 20. Poco::PooledThread::run() @ 0x0000000014d954a1
2024.04.17 08:48:48.986747 [ 767 ] {} <Fatal> BaseDaemon: 21. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
2024.04.17 08:48:48.986791 [ 767 ] {} <Fatal> BaseDaemon: 22. ? @ 0x00007f8487952609
2024.04.17 08:48:48.986830 [ 767 ] {} <Fatal> BaseDaemon: 23. ? @ 0x00007f8487877353
2024.04.17 08:48:49.152636 [ 767 ] {} <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: 3D80E1F632C131451BEFC024AB379208)
2024.04.17 08:48:49.152984 [ 767 ] {} <Fatal> BaseDaemon: Report this error to https://github.com/ClickHouse/ClickHouse/issues
2024.04.17 08:48:49.153157 [ 767 ] {} <Fatal> BaseDaemon: Changed settings: receive_timeout = 9999., send_timeout = 9999., cast_ipv4_ipv6_default_on_conversion_error = true
2024.04.17 08:48:52.984845 [ 768 ] {} <Fatal> BaseDaemon: ########## Short fault info ############
2024.04.17 08:48:52.984927 [ 768 ] {} <Fatal> BaseDaemon: (version 24.3.2.23 (official build), build id: DA47C8C3B6BA55C4A326D4DD33ACED2DFEA5DA96, git hash: 8b7d910960cc2c6a0db07991fe2576a67fe98146) (from thread 48) Received signal 11
2024.04.17 08:48:52.984987 [ 768 ] {} <Fatal> BaseDaemon: Signal description: Segmentation fault
2024.04.17 08:48:52.985020 [ 768 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Unknown si_code.
2024.04.17 08:48:52.985060 [ 768 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007f848777a941 0x000000000ce734ee 0x0000000017104303 0x00000000171042ef 0x00000000076592bb 0x0000000010268d3f 0x0000000010249bc6 0x0000000010248e40 0x0000000010b7e6e5 0x0000000010b73603 0x0000000010b842cf 0x00000000112705c2 0x000000001126bf9a 0x0000000012351d84 0x000000001236d099 0x0000000014c9bef2 0x0000000014c9cd39 0x0000000014d954a1 0x0000000014d93a3d 0x00007f8487952609 0x00007f8487877353
2024.04.17 08:48:52.985102 [ 768 ] {} <Fatal> BaseDaemon: ########################################
2024.04.17 08:48:52.985174 [ 768 ] {} <Fatal> BaseDaemon: (version 24.3.2.23 (official build), build id: DA47C8C3B6BA55C4A326D4DD33ACED2DFEA5DA96, git hash: 8b7d910960cc2c6a0db07991fe2576a67fe98146) (from thread 48) (query_id: 2ae3602e-bd6d-4094-9a70-5e6205dc6fd4) (query: attach table database_replication.table_xxx) Received signal Segmentation fault (11)
2024.04.17 08:48:52.985241 [ 768 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Unknown si_code.
2024.04.17 08:48:52.985335 [ 768 ] {} <Fatal> BaseDaemon: Stack trace: 0x00007f848777a941 0x000000000ce734ee 0x0000000017104303 0x00000000171042ef 0x00000000076592bb 0x0000000010268d3f 0x0000000010249bc6 0x0000000010248e40 0x0000000010b7e6e5 0x0000000010b73603 0x0000000010b842cf 0x00000000112705c2 0x000000001126bf9a 0x0000000012351d84 0x000000001236d099 0x0000000014c9bef2 0x0000000014c9cd39 0x0000000014d954a1 0x0000000014d93a3d 0x00007f8487952609 0x00007f8487877353
2024.04.17 08:48:52.985434 [ 768 ] {} <Fatal> BaseDaemon: 2. ? @ 0x00007f848777a941
2024.04.17 08:48:52.985638 [ 768 ] {} <Fatal> BaseDaemon: 3. terminate_handler() @ 0x000000000ce734ee
2024.04.17 08:48:52.985724 [ 768 ] {} <Fatal> BaseDaemon: 4. std::__terminate(void (*)()) @ 0x0000000017104303
2024.04.17 08:48:52.985818 [ 768 ] {} <Fatal> BaseDaemon: 5. std::terminate() @ 0x00000000171042ef
2024.04.17 08:48:52.985907 [ 768 ] {} <Fatal> BaseDaemon: 6. ? @ 0x00000000076592bb
2024.04.17 08:48:52.986073 [ 768 ] {} <Fatal> BaseDaemon: 7. DB::PostgreSQLReplicationHandler::addTableToReplication(DB::StorageMaterializedPostgreSQL*, String const&) @ 0x0000000010268d3f
2024.04.17 08:48:52.986214 [ 768 ] {} <Fatal> BaseDaemon: 8. DB::DatabaseMaterializedPostgreSQL::attachTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, String const&) @ 0x0000000010249bc6
2024.04.17 08:48:52.986382 [ 768 ] {} <Fatal> BaseDaemon: 9. DB::DatabaseMaterializedPostgreSQL::createTable(std::shared_ptr<DB::Context const>, String const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::IAST> const&) @ 0x0000000010248e40
2024.04.17 08:48:52.986518 [ 768 ] {} <Fatal> BaseDaemon: 10. DB::InterpreterCreateQuery::doCreateTable(DB::ASTCreateQuery&, DB::InterpreterCreateQuery::TableProperties const&, std::unique_ptr<DB::DDLGuard, std::default_delete<DB::DDLGuard>>&) @ 0x0000000010b7e6e5
2024.04.17 08:48:52.986582 [ 768 ] {} <Fatal> BaseDaemon: 11. DB::InterpreterCreateQuery::createTable(DB::ASTCreateQuery&) @ 0x0000000010b73603
2024.04.17 08:48:52.986628 [ 768 ] {} <Fatal> BaseDaemon: 12. DB::InterpreterCreateQuery::execute() @ 0x0000000010b842cf
2024.04.17 08:48:52.986670 [ 768 ] {} <Fatal> BaseDaemon: 13. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000112705c2
2024.04.17 08:48:52.986720 [ 768 ] {} <Fatal> BaseDaemon: 14. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001126bf9a
2024.04.17 08:48:52.986769 [ 768 ] {} <Fatal> BaseDaemon: 15. DB::TCPHandler::runImpl() @ 0x0000000012351d84
2024.04.17 08:48:52.986812 [ 768 ] {} <Fatal> BaseDaemon: 16. DB::TCPHandler::run() @ 0x000000001236d099
2024.04.17 08:48:52.986859 [ 768 ] {} <Fatal> BaseDaemon: 17. Poco::Net::TCPServerConnection::start() @ 0x0000000014c9bef2
2024.04.17 08:48:52.986892 [ 768 ] {} <Fatal> BaseDaemon: 18. Poco::Net::TCPServerDispatcher::run() @ 0x0000000014c9cd39
2024.04.17 08:48:52.986933 [ 768 ] {} <Fatal> BaseDaemon: 19. Poco::PooledThread::run() @ 0x0000000014d954a1
2024.04.17 08:48:52.986977 [ 768 ] {} <Fatal> BaseDaemon: 20. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000014d93a3d
2024.04.17 08:48:52.987009 [ 768 ] {} <Fatal> BaseDaemon: 21. ? @ 0x00007f8487952609
2024.04.17 08:48:52.987038 [ 768 ] {} <Fatal> BaseDaemon: 22. ? @ 0x00007f8487877353
2024.04.17 08:48:53.158468 [ 768 ] {} <Fatal> BaseDaemon: Integrity check of the executable successfully passed (checksum: 3D80E1F632C131451BEFC024AB379208)
2024.04.17 08:48:53.158774 [ 768 ] {} <Fatal> BaseDaemon: Report this error to https://github.com/ClickHouse/ClickHouse/issues
2024.04.17 08:48:53.158904 [ 768 ] {} <Fatal> BaseDaemon: Changed settings: receive_timeout = 9999., send_timeout = 9999., cast_ipv4_ipv6_default_on_conversion_error = true

After the crash, all the rows seems replicated in the clickhouse table but the table is not listed on the source in pg_publication_tables

After dropping the table permanently and rerunning the attach query, it works

I'm running the docker image clickhouse/clickhouse-server:latest on ubuntu

nkonev commented 6 months ago

:6666

ERROR: replication slot "database_tmp" does not exist

If you use Patroni or other management tool - it can remove unknown(from their prospective) replication slots. May be it similar to my issue https://github.com/ClickHouse/ClickHouse/issues/62749

erwannbst commented 6 months ago

I don't use Patroni