There are several limitations to JDBC cancellations:
- The COPY command is not cancellable.
- A query cannot be cancelled when it is in the prepare phase.
- Cancelling a SELECT can be done but the selected data will be returned before you get the canceled status.
- When two cancels are executed at almost the same time, only one query will be canceled.