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

Don't close connection with query timeout when no query is in flight #629

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcoleman
Copy link
Contributor

@jcoleman jcoleman commented Jul 9, 2021

Fixes #579.

@petere
Copy link
Member

petere commented Mar 14, 2022

I'm not sure this is the right solution. It seems unprincipled to mix in a condition based on the server's transaction status. I think the problem here is rather that the query timeout is calculated based on the client's request_time rather than the query_start, and moreover it should check whether query_start != 0, that is, is a query in progress at all. At the moment, it is more an activity timeout rather than a query timeout.

Note that there is a second piece of code that handles query_timeout, in pool_client_maint(). There, it uses a mix of request_time and query_start. This is also confusing.

Copy link
Member

@JelteF JelteF left a comment

Choose a reason for hiding this comment

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

I agree with Peter here that this is currently not the right fix, also this should have a test.

@JelteF
Copy link
Member

JelteF commented Oct 13, 2023

To clarify, I agree that there is a bug here. But the we should not fix it in the way that this PR currently does. The suggestion from @petere seems like a better approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

query_timeout limits whole transaction time
3 participants