Merge pull request #65933 from ClickHouse/backport/24.5/65771

Backport #65771 to 24.5: PostgreSQL source support cancel query
This commit is contained in:
robot-clickhouse 2024-07-01 18:27:09 +02:00 committed by GitHub
commit 4c542511fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -191,6 +191,12 @@ PostgreSQLSource<T>::~PostgreSQLSource()
{
try
{
if (stream)
{
tx->conn().cancel_query();
stream->close();
}
stream.reset();
tx.reset();
}