2
0

Context cancellation is fatal during query

This commit is contained in:
Jack Christensen
2019-03-30 16:44:20 -05:00
parent b2fc69d32f
commit 444bd6deaf
5 changed files with 60 additions and 311 deletions
+5 -5
View File
@@ -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