-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
difficulty: mediumHaskell task involving PostgreSQL IOHaskell task involving PostgreSQL IO
Description
Problem
Currently we support setting a statement_timeout per role and per function, but we don't have a way to support it per table or view.
Solution
Send the timeout through an HTTP header.
Timeout: Second-2The above is the Timeout header from WebDAV (ref), but it has WebDAV specific semantics so I don't think we can reuse it.
A saner option would be a Prefer header:
Prefer: handling=strict, timeout=2Some drawbacks I can see is that this can be used to force failure by end users if the statement_timeout is set to a value too low (this in turn can pollute logs). For this maybe we can only allow seconds, instead of milliseconds. So only 1 second as minimum.
This timeout should also have a threshold, it cannot be too high. This threshold could be the role timeout or the function timeout.
Metadata
Metadata
Assignees
Labels
difficulty: mediumHaskell task involving PostgreSQL IOHaskell task involving PostgreSQL IO