Merge pull request #65935 from ClickHouse/backport/24.6/65771

Backport #65771 to 24.6: PostgreSQL source support cancel query
This commit is contained in:
robot-ch-test-poll1 2024-07-01 20:09:08 +04:00 committed by GitHub
commit 6c7e71a98b
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();
}