Replies: 4 comments
-
Alternatively, is there a way to set the stament_timeout for the connection using the pgdriver dialect? |
Beta Was this translation helpful? Give feedback.
-
You probably can use |
Beta Was this translation helpful? Give feedback.
-
Out of curiosity, are there any plans to support query cancelation when the context is canceled or timeouts? A feature that would be similar to the context cancelation implemented in lib/pq via the sending of the Thanks. |
Beta Was this translation helpful? Give feedback.
-
Moreover, this feature was supported by go-pg: https://github.com/go-pg/pg/blob/f7e1c98fed3044ae4e195a0e063f69185fb1885b/base.go#L529 I'm not convinced that the feature is always useful, especially for short queries, as it might be more efficient to just let the query finish instead of opening the new connection and sending the cancel signal. So really want to hear if it was deliberately omitted or ...? Thank you. |
Beta Was this translation helpful? Give feedback.
-
When using
ctx.WithTimeout
orctx.WithCancel
the call on the golang side gets cancelled but i still see the long running query in the Postgres side.I would hope/want/expect the call to be cancelled as well in the DB side?
Is there away to do that?
Beta Was this translation helpful? Give feedback.
All reactions