Skip to content

Commit

Permalink
Backport ClickHouse#65771 to 24.3: PostgreSQL source support cancel q…
Browse files Browse the repository at this point in the history
…uery
  • Loading branch information
robot-clickhouse committed Jul 1, 2024
1 parent 297ceee commit 45f1361
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 45f1361

Please sign in to comment.