On 2016/04/26 21:45, Etsuro Fujita wrote:
> While re-reviewing the fix, I noticed that since PQcancel we added to
> pgfdw_xact_callback to cancel a DML pushdown query isn't followed by a
> ROLLBACK, the connection to the remote server will be discarded at the
> end of the while loop in that function, which will cause a FATAL error
> of "connection to client lost". Probably, that was proposed by me in
> the first version of the patch, but I don't think that's a good idea.
> Shouldn't we execute ROLLBACK after that PQcancel?
>
> Another thing I noticed is, ISTM that we miss the case where DML
> pushdown queries are performed in subtransactions. I think cancellation
> logic would also need to be added to pgfdw_subxact_callback.
Attached is a patch for that.
Best regards,
Etsuro Fujita