Context cancellation is fatal during query
This commit is contained in:
@@ -20,10 +20,10 @@ result. The ReadAll method reads all query results into memory.
|
||||
|
||||
Context Support
|
||||
|
||||
All potentially blocking operations take a context.Context. If a context is canceled while a query is in progress the
|
||||
method immediately returns. In the background a cancel request will be sent to the PostgreSQL server. If the
|
||||
cancellation fails or hangs for more than a short time (approximately 15 seconds) the connection will be closed. It is
|
||||
safe to use the connection while this background cancellation is in progress. Any calls will block until the
|
||||
cancellation and resynchronization is complete (and those calls can be aborted by a context cancellation).
|
||||
All potentially blocking operations take a context.Context. If a context is canceled while the method is in progress the
|
||||
method immediately returns. In most circumstances, this will close the underlying connection.
|
||||
|
||||
The CancelRequest method may be used to request the PostgreSQL server cancel an in-progress query without forcing the
|
||||
client to abort.
|
||||
*/
|
||||
package pgconn
|
||||
|
||||
Reference in New Issue
Block a user