Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pg connection-manager.js): add query_timeout to dialogOptions #13476

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
// DB statement timeout in milliseconds. Added in pg v7.3
'statement_timeout',
// Client side request timeout in milliseconds. Added in pg v7.7
'query_timeout',
Comment on lines +118 to +119
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took me a moment to realize this isn't a sequelize option, its an option pg. Can you add a link to the docs for clarification? Thanks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the majority if not all of those dialectOptions are related to the postgres client (there is a comment at the very top of that code block)

// 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