And missing query id:

```
2021.05.11 03:38:25.655344 [ 297 ] {} <Fatal> BaseDaemon: (version 21.6.1.6800, build id: E29A05B5EF4930BE7E098E8DF73245CE2AD33D96) (from thread 2350) Terminate called for uncaught exception:
Code: 241, e.displayText() = DB::Exception: Memory limit (total) exceeded: would use 63.49 GiB (attempt to allocate chunk of 4194334 bytes), maximum: 62.94 GiB, Stack trace (when copying this message, always include the lines below):

0. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/exception:0: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x16f3b67b in /usr/bin/clickhouse
1. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:57: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x8fe9adc in /usr/bin/clickhouse
2. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/string:1444: DB::Exception::Exception<char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, long&, std::__1::basic_string<char, std::__
3. ./obj-x86_64-linux-gnu/../src/Common/MemoryTracker.cpp:221: MemoryTracker::alloc(long) @ 0x8fc7cf0 in /usr/bin/clickhouse
4. ./obj-x86_64-linux-gnu/../src/Common/MemoryTracker.cpp:0: MemoryTracker::alloc(long) @ 0x8fc7a5b in /usr/bin/clickhouse
5. ./obj-x86_64-linux-gnu/../src/Common/MemoryTracker.cpp:0: MemoryTracker::alloc(long) @ 0x8fc7a5b in /usr/bin/clickhouse
6. ./obj-x86_64-linux-gnu/../src/Common/MemoryTracker.cpp:0: MemoryTracker::alloc(long) @ 0x8fc7a5b in /usr/bin/clickhouse
7. ./obj-x86_64-linux-gnu/../src/Common/CurrentMemoryTracker.cpp:43: CurrentMemoryTracker::alloc(long) @ 0x90081b1 in /usr/bin/clickhouse
8. ./obj-x86_64-linux-gnu/../src/Common/Allocator.h:96: void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 0ul, 0ul>::resize<>(unsigned long) @ 0x12d57d2d in /usr/bin/clickhouse
9. ./obj-x86_64-linux-gnu/../src/Compression/CompressedWriteBuffer.cpp:0: DB::CompressedWriteBuffer::nextImpl() @ 0x12d631f3 in /usr/bin/clickhouse
10. ./obj-x86_64-linux-gnu/../src/IO/BufferBase.h:39: DB::CompressedWriteBuffer::~CompressedWriteBuffer() @ 0x12d63507 in /usr/bin/clickhouse
11. ./obj-x86_64-linux-gnu/../src/DataStreams/TemporaryFileStream.h:0: DB::TemporaryFileStream::write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Block const&, DB::IBlockInputStream&, std::__1
12. ./obj-x86_64-linux-gnu/../src/Interpreters/SortedBlocksWriter.cpp:0: DB::(anonymous namespace)::flushToFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Block const&, DB::IBlockInputStream&
13. ./obj-x86_64-linux-gnu/../src/Interpreters/SortedBlocksWriter.cpp:0: DB::SortedBlocksWriter::flush(std::__1::list<DB::Block, std::__1::allocator<DB::Block> > const&) const @ 0x137dca90 in /usr/bin/clickhouse
14. ./obj-x86_64-linux-gnu/../src/Interpreters/SortedBlocksWriter.cpp:95: DB::SortedBlocksWriter::insert(DB::Block&&) @ 0x137dc5b8 in /usr/bin/clickhouse
15. ./obj-x86_64-linux-gnu/../src/Interpreters/MergeJoin.cpp:0: DB::MergeJoin::saveRightBlock(DB::Block&&) @ 0x1374ebf7 in /usr/bin/clickhouse
16. ./obj-x86_64-linux-gnu/../src/Interpreters/MergeJoin.cpp:0: DB::MergeJoin::addJoinedBlock(DB::Block const&, bool) @ 0x1374f1a9 in /usr/bin/clickhouse
17. ./obj-x86_64-linux-gnu/../src/Processors/Transforms/JoiningTransform.cpp:0: DB::FillingRightJoinSideTransform::work() @ 0x14484233 in /usr/bin/clickhouse
```
: file_in(path)
        , compressed_in(file_in)
        , block_in(std::make_shared<NativeBlockInputStream>(compressed_in, DBMS_TCP_PROTOCOL_VERSION))
    {}
    TemporaryFileStream(const std::string & path, const Block & header_)
        : file_in(path)
        , compressed_in(file_in)
        , block_in(std::make_shared<NativeBlockInputStream>(compressed_in, header_, 0))
    {}
    
    static void write(const std::string & path, const Block & header, IBlockInputStream & input,
                      std::atomic<bool> * is_cancelled, const std::string & codec)
    {
        WriteBufferFromFile file_buf(path);
        CompressedWriteBuffer compressed_buf(file_buf, CompressionCodecFactory::instance().get(codec, {}));
        NativeBlockOutputStream output(compressed_buf, 0, header);
        copyData(input, output, is_cancelled);
    }
};
class TemporaryFileLazyInputStream : public IBlockInputStream
{
public:
    TemporaryFileLazyInputStream(const std::string & path_, const Block & header_)