Skip to content

Commit 93cbfdb

Browse files
authored
Add 'query_timeout' to pg dialectOptions
This option has existed in pg since v7.7 - see discussion at brianc/node-postgres#1760 Adding to properties to be passed to new connection config so it can be used with sequelize
1 parent 56bb1d6 commit 93cbfdb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/dialects/postgres/connection-manager.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ class ConnectionManager extends AbstractConnectionManager {
113113
// This should help with backends incorrectly considering idle clients to be dead and prematurely disconnecting them.
114114
// this feature has been added in pg module v6.0.0, check pg/CHANGELOG.md
115115
'keepAlive',
116-
// Times out queries after a set time in milliseconds. Added in pg v7.3
116+
// DB statement timeout in milliseconds. Added in pg v7.3
117117
'statement_timeout',
118+
// Client side request timeout in milliseconds. Added in pg v7.7
119+
'query_timeout'
118120
// Terminate any session with an open transaction that has been idle for longer than the specified duration in milliseconds. Added in pg v7.17.0 only supported in postgres >= 10
119121
'idle_in_transaction_session_timeout'
120122
]));

0 commit comments

Comments
 (0)