Skip to content

Commit

Permalink
Merge pull request ClickHouse#65929 from ClickHouse/backport/24.3/65771
Browse files Browse the repository at this point in the history
Backport ClickHouse#65771 to 24.3: PostgreSQL source support cancel query
  • Loading branch information
robot-ch-test-poll3 authored Jul 1, 2024
2 parents 297ceee + 45f1361 commit fe54cea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Processors/Sources/PostgreSQLSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ PostgreSQLSource<T>::~PostgreSQLSource()
{
try
{
if (stream)
{
tx->conn().cancel_query();
stream->close();
}

stream.reset();
tx.reset();
}
Expand Down

0 comments on commit fe54cea

Please sign in to comment.