hasura / hasura/graphql-engine

Allow a max statement timeout for Postgres

Open
#8,266 7 comments 0 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Is your proposal related to a problem?

I'm not able to put an upper bound on postgres queries, which opens us up to bad queries taking down the databas

### Describe the solution you'd like

Add an env var or metadata to the end of HASURA_GRAPHQL_PG_STATEMENT_TIMEOUT

### Describe alternatives you've considered

Looks like the only timeout configuration is in metadata and only terminates idle connections. It appears you have a solution in Hasura Cloud as well but not for OSS

### If the feature is approved, would you be willing to submit a PR?

Maybe

Contributor guide

Open the contributing guide

Research direction

No files or tests are identified in the issue. Start by tracing the existing HASURA_GRAPHQL_PG_STATEMENT_TIMEOUT configuration and metadata handling, then determine how an OSS maximum should be represented and enforced; done means PostgreSQL queries cannot exceed the configured upper bound and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.