This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Context allows queries to be cancelled. This can be used when we expect a SIGINT/SIGTERM could occur during a query that could block (e.g. trying to SELECT from a table but some other session explicitly grabbed an AccessExclusiveLock and will not be giving it up anytime soon). Without the ability to cancel queries, exiting Go programs could lead to SQL session leaks. Simply closing the SQL connection DOES NOT cancel the query for you.
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters