{"action":"created","comment":{"url":"https://api.github.com/repos/tgriesser/knex/pulls/comments/212195470","pull_request_review_id":148772922,"id":212195470,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjE5NTQ3MA==","diff_hunk":"@@ -266,6 +267,30 @@ assign(Client_PG.prototype, {\n     }\n     return resp;\n   },\n+\n+  canCancelQuery: true,\n+  cancelQuery(connectionToKill) {\n+    const acquiringConn = this.acquireConnection();\n+\n+    // Error out if we can't acquire connection in time.\n+    // Purposely not putting timeout on `pg_terminate_backend` execution because erroring\n+    // early there would release the `connectionToKill` back to the pool with\n+    // a `KILL QUERY` command yet to finish.\n+    return acquiringConn\n+      .timeout(100)","path":"src/dialects/postgres/index.js","position":null,"original_position":19,"commit_id":"e37e5145c329a2010f77042df84c83553006e736","original_commit_id":"4ac41b5f190fc0ad7cc835a05f487ed51d8a7057","user":{"login":"veikovx","id":2744299,"node_id":"MDQ6VXNlcjI3NDQyOTk=","avatar_url":"https://avatars1.githubusercontent.com/u/2744299?v=4","gravatar_id":"","url":"https://api.github.com/users/veikovx","html_url":"https://github.com/veikovx","followers_url":"https://api.github.com/users/veikovx/followers","following_url":"https://api.github.com/users/veikovx/following{/other_user}","gists_url":"https://api.github.com/users/veikovx/gists{/gist_id}","starred_url":"https://api.github.com/users/veikovx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veikovx/subscriptions","organizations_url":"https://api.github.com/users/veikovx/orgs","repos_url":"https://api.github.com/users/veikovx/repos","events_url":"https://api.github.com/users/veikovx/events{/privacy}","received_events_url":"https://api.github.com/users/veikovx/received_events","type":"User","site_admin":false},"body":"You're correct. Will fix.\r\nAlso found that the test for this was not even being triggered, fixing that as well.","created_at":"2018-08-23T06:32:04Z","updated_at":"2018-08-23T06:32:04Z","html_url":"https://github.com/tgriesser/knex/pull/2636#discussion_r212195470","pull_request_url":"https://api.github.com/repos/tgriesser/knex/pulls/2636","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/tgriesser/knex/pulls/comments/212195470"},"html":{"href":"https://github.com/tgriesser/knex/pull/2636#discussion_r212195470"},"pull_request":{"href":"https://api.github.com/repos/tgriesser/knex/pulls/2636"}},"in_reply_to_id":211067936},"pull_request":{"url":"https://api.github.com/repos/tgriesser/knex/pulls/2636","id":191349224,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxMzQ5MjI0","html_url":"https://github.com/tgriesser/knex/pull/2636","diff_url":"https://github.com/tgriesser/knex/pull/2636.diff","patch_url":"https://github.com/tgriesser/knex/pull/2636.patch","issue_url":"https://api.github.com/repos/tgriesser/knex/issues/2636","number":2636,"state":"open","locked":false,"title":"Kill queries after timeout for PostgreSQL","user":{"login":"veikovx","id":2744299,"node_id":"MDQ6VXNlcjI3NDQyOTk=","avatar_url":"https://avatars1.githubusercontent.com/u/2744299?v=4","gravatar_id":"","url":"https://api.github.com/users/veikovx","html_url":"https://github.com/veikovx","followers_url":"https://api.github.com/users/veikovx/followers","following_url":"https://api.github.com/users/veikovx/following{/other_user}","gists_url":"https://api.github.com/users/veikovx/gists{/gist_id}","starred_url":"https://api.github.com/users/veikovx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veikovx/subscriptions","organizations_url":"https://api.github.com/users/veikovx/orgs","repos_url":"https://api.github.com/users/veikovx/repos","events_url":"https://api.github.com/users/veikovx/events{/privacy}","received_events_url":"https://api.github.com/users/veikovx/received_events","type":"User","site_admin":false},"body":"This is for #707 .\r\nBasically a copy of the mysql functionality implemented for PostgreSQL","created_at":"2018-05-30T06:48:36Z","updated_at":"2018-08-23T06:32:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9189092fe4022d00bc9054843d51eb0ac9d3740","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tgriesser/knex/pulls/2636/commits","review_comments_url":"https://api.github.com/repos/tgriesser/knex/pulls/2636/comments","review_comment_url":"https://api.github.com/repos/tgriesser/knex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tgriesser/knex/issues/2636/comments","statuses_url":"https://api.github.com/repos/tgriesser/knex/statuses/e37e5145c329a2010f77042df84c83553006e736","head":{"label":"veikovx:postgresKillQuery","ref":"postgresKillQuery","sha":"e37e5145c329a2010f77042df84c83553006e736","user":{"login":"veikovx","id":2744299,"node_id":"MDQ6VXNlcjI3NDQyOTk=","avatar_url":"https://avatars1.githubusercontent.com/u/2744299?v=4","gravatar_id":"","url":"https://api.github.com/users/veikovx","html_url":"https://github.com/veikovx","followers_url":"https://api.github.com/users/veikovx/followers","following_url":"https://api.github.com/users/veikovx/following{/other_user}","gists_url":"https://api.github.com/users/veikovx/gists{/gist_id}","starred_url":"https://api.github.com/users/veikovx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veikovx/subscriptions","organizations_url":"https://api.github.com/users/veikovx/orgs","repos_url":"https://api.github.com/users/veikovx/repos","events_url":"https://api.github.com/users/veikovx/events{/privacy}","received_events_url":"https://api.github.com/users/veikovx/received_events","type":"User","site_admin":false},"repo":{"id":135257156,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUyNTcxNTY=","name":"knex","full_name":"veikovx/knex","owner":{"login":"veikovx","id":2744299,"node_id":"MDQ6VXNlcjI3NDQyOTk=","avatar_url":"https://avatars1.githubusercontent.com/u/2744299?v=4","gravatar_id":"","url":"https://api.github.com/users/veikovx","html_url":"https://github.com/veikovx","followers_url":"https://api.github.com/users/veikovx/followers","following_url":"https://api.github.com/users/veikovx/following{/other_user}","gists_url":"https://api.github.com/users/veikovx/gists{/gist_id}","starred_url":"https://api.github.com/users/veikovx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veikovx/subscriptions","organizations_url":"https://api.github.com/users/veikovx/orgs","repos_url":"https://api.github.com/users/veikovx/repos","events_url":"https://api.github.com/users/veikovx/events{/privacy}","received_events_url":"https://api.github.com/users/veikovx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/veikovx/knex","description":"A query builder for PostgreSQL, MySQL and SQLite3, designed to be flexible, portable, and fun to use.","fork":true,"url":"https://api.github.com/repos/veikovx/knex","forks_url":"https://api.github.com/repos/veikovx/knex/forks","keys_url":"https://api.github.com/repos/veikovx/knex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/veikovx/knex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/veikovx/knex/teams","hooks_url":"https://api.github.com/repos/veikovx/knex/hooks","issue_events_url":"https://api.github.com/repos/veikovx/knex/issues/events{/number}","events_url":"https://api.github.com/repos/veikovx/knex/events","assignees_url":"https://api.github.com/repos/veikovx/knex/assignees{/user}","branches_url":"https://api.github.com/repos/veikovx/knex/branches{/branch}","tags_url":"https://api.github.com/repos/veikovx/knex/tags","blobs_url":"https://api.github.com/repos/veikovx/knex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/veikovx/knex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/veikovx/knex/git/refs{/sha}","trees_url":"https://api.github.com/repos/veikovx/knex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/veikovx/knex/statuses/{sha}","languages_url":"https://api.github.com/repos/veikovx/knex/languages","stargazers_url":"https://api.github.com/repos/veikovx/knex/stargazers","contributors_url":"https://api.github.com/repos/veikovx/knex/contributors","subscribers_url":"https://api.github.com/repos/veikovx/knex/subscribers","subscription_url":"https://api.github.com/repos/veikovx/knex/subscription","commits_url":"https://api.github.com/repos/veikovx/knex/commits{/sha}","git_commits_url":"https://api.github.com/repos/veikovx/knex/git/commits{/sha}","comments_url":"https://api.github.com/repos/veikovx/knex/comments{/number}","issue_comment_url":"https://api.github.com/repos/veikovx/knex/issues/comments{/number}","contents_url":"https://api.github.com/repos/veikovx/knex/contents/{+path}","compare_url":"https://api.github.com/repos/veikovx/knex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/veikovx/knex/merges","archive_url":"https://api.github.com/repos/veikovx/knex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/veikovx/knex/downloads","issues_url":"https://api.github.com/repos/veikovx/knex/issues{/number}","pulls_url":"https://api.github.com/repos/veikovx/knex/pulls{/number}","milestones_url":"https://api.github.com/repos/veikovx/knex/milestones{/number}","notifications_url":"https://api.github.com/repos/veikovx/knex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/veikovx/knex/labels{/name}","releases_url":"https://api.github.com/repos/veikovx/knex/releases{/id}","deployments_url":"https://api.github.com/repos/veikovx/knex/deployments","created_at":"2018-05-29T07:21:22Z","updated_at":"2018-05-29T07:21:24Z","pushed_at":"2018-08-23T06:25:12Z","git_url":"git://github.com/veikovx/knex.git","ssh_url":"git@github.com:veikovx/knex.git","clone_url":"https://github.com/veikovx/knex.git","svn_url":"https://github.com/veikovx/knex","homepage":"knexjs.org","size":12605,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tgriesser:master","ref":"master","sha":"0db2a1eaaebc381aa5e0df875d31cf82f29d319c","user":{"login":"tgriesser","id":154748,"node_id":"MDQ6VXNlcjE1NDc0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/154748?v=4","gravatar_id":"","url":"https://api.github.com/users/tgriesser","html_url":"https://github.com/tgriesser","followers_url":"https://api.github.com/users/tgriesser/followers","following_url":"https://api.github.com/users/tgriesser/following{/other_user}","gists_url":"https://api.github.com/users/tgriesser/gists{/gist_id}","starred_url":"https://api.github.com/users/tgriesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgriesser/subscriptions","organizations_url":"https://api.github.com/users/tgriesser/orgs","repos_url":"https://api.github.com/users/tgriesser/repos","events_url":"https://api.github.com/users/tgriesser/events{/privacy}","received_events_url":"https://api.github.com/users/tgriesser/received_events","type":"User","site_admin":false},"repo":{"id":7363211,"node_id":"MDEwOlJlcG9zaXRvcnk3MzYzMjEx","name":"knex","full_name":"tgriesser/knex","owner":{"login":"tgriesser","id":154748,"node_id":"MDQ6VXNlcjE1NDc0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/154748?v=4","gravatar_id":"","url":"https://api.github.com/users/tgriesser","html_url":"https://github.com/tgriesser","followers_url":"https://api.github.com/users/tgriesser/followers","following_url":"https://api.github.com/users/tgriesser/following{/other_user}","gists_url":"https://api.github.com/users/tgriesser/gists{/gist_id}","starred_url":"https://api.github.com/users/tgriesser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgriesser/subscriptions","organizations_url":"https://api.github.com/users/tgriesser/orgs","repos_url":"https://api.github.com/users/tgriesser/repos","events_url":"https://api.github.com/users/tgriesser/events{/privacy}","received_events_url":"https://api.github.com/users/tgriesser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tgriesser/knex","description":"A query builder for PostgreSQL, MySQL and SQLite3, designed to be flexible, portable, and fun to use.","fork":false,"url":"https://api.github.com/repos/tgriesser/knex","forks_url":"https://api.github.com/repos/tgriesser/knex/forks","keys_url":"https://api.github.com/repos/tgriesser/knex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgriesser/knex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgriesser/knex/teams","hooks_url":"https://api.github.com/repos/tgriesser/knex/hooks","issue_events_url":"https://api.github.com/repos/tgriesser/knex/issues/events{/number}","events_url":"https://api.github.com/repos/tgriesser/knex/events","assignees_url":"https://api.github.com/repos/tgriesser/knex/assignees{/user}","branches_url":"https://api.github.com/repos/tgriesser/knex/branches{/branch}","tags_url":"https://api.github.com/repos/tgriesser/knex/tags","blobs_url":"https://api.github.com/repos/tgriesser/knex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgriesser/knex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgriesser/knex/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgriesser/knex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgriesser/knex/statuses/{sha}","languages_url":"https://api.github.com/repos/tgriesser/knex/languages","stargazers_url":"https://api.github.com/repos/tgriesser/knex/stargazers","contributors_url":"https://api.github.com/repos/tgriesser/knex/contributors","subscribers_url":"https://api.github.com/repos/tgriesser/knex/subscribers","subscription_url":"https://api.github.com/repos/tgriesser/knex/subscription","commits_url":"https://api.github.com/repos/tgriesser/knex/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgriesser/knex/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgriesser/knex/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgriesser/knex/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgriesser/knex/contents/{+path}","compare_url":"https://api.github.com/repos/tgriesser/knex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgriesser/knex/merges","archive_url":"https://api.github.com/repos/tgriesser/knex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgriesser/knex/downloads","issues_url":"https://api.github.com/repos/tgriesser/knex/issues{/number}","pulls_url":"https://api.github.com/repos/tgriesser/knex/pulls{/number}","milestones_url":"https://api.github.com/repos/tgriesser/knex/milestones{/number}","notifications_url":"https://api.github.com/repos/tgriesser/knex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgriesser/knex/labels{/name}","releases_url":"https://api.github.com/repos/tgriesser/knex/releases{/id}","deployments_url":"https://api.github.com/repos/tgriesser/knex/deployments","created_at":"2012-12-29T05:18:25Z","updated_at":"2018-08-23T05:36:03Z","pushed_at":"2018-08-23T06:25:14Z","git_url":"git://github.com/tgriesser/knex.git","ssh_url":"git@github.com:tgriesser/knex.git","clone_url":"https://github.com/tgriesser/knex.git","svn_url":"https://github.com/tgriesser/knex","homepage":"knexjs.org","size":12731,"stargazers_count":7639,"watchers_count":7639,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1016,"mirror_url":null,"archived":false,"open_issues_count":373,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1016,"open_issues":373,"watchers":7639,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tgriesser/knex/pulls/2636"},"html":{"href":"https://github.com/tgriesser/knex/pull/2636"},"issue":{"href":"https://api.github.com/repos/tgriesser/knex/issues/2636"},"comments":{"href":"https://api.github.com/repos/tgriesser/knex/issues/2636/comments"},"review_comments":{"href":"https://api.github.com/repos/tgriesser/knex/pulls/2636/comments"},"review_comment":{"href":"https://api.github.com/repos/tgriesser/knex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tgriesser/knex/pulls/2636/commits"},"statuses":{"href":"https://api.github.com/repos/tgriesser/knex/statuses/e37e5145c329a2010f77042df84c83553006e736"}},"author_association":"NONE"}}
{"actor":{"display_login":"veikovx"}}