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

Conversation

2ns2os
Copy link

@2ns2os 2ns2os commented Sep 3, 2021

Pull Request check-list

  • (except for pre-existing 'Alias' FIXME Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [] N/A Did you update the typescript typings accordingly (if applicable)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

The query_timeout option has existed in pg since v7.7 - see discussion at brianc/node-postgres#1760

This change adds it to properties to be passed to new connection config so it can be used with sequelize

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
@2ns2os 2ns2os changed the title [WIP] Add 'query_timeout' to pg dialectOptions fix(pg connection-manager.js): add query_timeout to dialogOptions Sep 3, 2021
@2ns2os 2ns2os marked this pull request as ready for review September 3, 2021 19:47
Copy link
Author

@2ns2os 2ns2os left a comment

Choose a reason for hiding this comment

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

missing comma

@wbourne0 wbourne0 added dialect: postgres For issues and PRs. Things that involve PostgreSQL (and do not involve all dialects). type: bug labels Oct 10, 2021
Copy link
Member

@wbourne0 wbourne0 left a comment

Choose a reason for hiding this comment

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

Looks safe enough. Ideally there'd be tests for it, but this should be fine.

Comment on lines +118 to +119
// Client side request timeout in milliseconds. Added in pg v7.7
'query_timeout',
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)

@sdepold sdepold added the status: awaiting response For issues and PRs. OP must respond (or change something, if it is a PR). Maintainers have no action label Oct 16, 2021
@sdepold
Copy link
Member

sdepold commented Oct 17, 2021

Same as #13258 ?

@github-actions github-actions bot removed the status: awaiting response For issues and PRs. OP must respond (or change something, if it is a PR). Maintainers have no action label Oct 17, 2021
@sdepold
Copy link
Member

sdepold commented Oct 17, 2021

going to close this one since the other PR has a test

@sdepold sdepold closed this Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialect: postgres For issues and PRs. Things that involve PostgreSQL (and do not involve all dialects). type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants