Skip to content

Commit

Permalink
Add 'query_timeout' to postgres dialectOptions
Browse files Browse the repository at this point in the history
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
  • Loading branch information
2ns2os committed Sep 3, 2021
1 parent 56bb1d6 commit 03ae5be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/dialects/postgres/connection-manager.js
Expand Up @@ -113,8 +113,10 @@ class ConnectionManager extends AbstractConnectionManager {
// 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',
// Times out queries after a set time in milliseconds. Added in pg v7.3
// Times out db statments after a set time in milliseconds. Added in pg v7.3
'statement_timeout',
// Times out requests after set time in milliseconds (client side). Added in pg v7.7
'query_timeout'
// 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
'idle_in_transaction_session_timeout'
]));
Expand Down

0 comments on commit 03ae5be

Please sign in to comment.