From d3a96642eda560f52100d86423863eeae3be0243 Mon Sep 17 00:00:00 2001 From: Amjad Masad Date: Tue, 19 Sep 2017 20:19:50 -0700 Subject: [PATCH] Pass-through postgres connection option 'statement_timeout' node-postgres recently added support for 'statement_timeout' -- a per connection query timeout. See - https://github.com/brianc/node-postgres/pull/1436 --- lib/dialects/postgres/connection-manager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dialects/postgres/connection-manager.js b/lib/dialects/postgres/connection-manager.js index 66cfac00e628..5c6f3b550e48 100644 --- a/lib/dialects/postgres/connection-manager.js +++ b/lib/dialects/postgres/connection-manager.js @@ -79,7 +79,9 @@ class ConnectionManager extends AbstractConnectionManager { 'binary', // This should help with backends incorrectly considering idle clients to be dead and prematurely disconnecting them. // this feature has been added in pg module v6.0.0, check pg/CHANGELOG.md - 'keepAlive' + 'keepAlive', + // Times out queries after a set time in milliseconds. Added in pg v7.3 + 'statement_timeout' ])); }