⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@bgentry
Copy link
Contributor

@bgentry bgentry commented Feb 9, 2026

River CLI Postgres commands had fixed session defaults and no explicit flag for statement timeout. For long-running migrations, callers either accepted the default or had to encode statement_timeout into the connection string. This could be difficult in deployed environments where i.e. a database connection string was shared with an application and the user did not want to accidentally affect timeouts for other processes using a shared connection string.

This commit adds a root --statement-timeout flag and thread it through command bootstrapping into Postgres pool configuration. Statement timeout now uses explicit precedence: flag value first, then connection-string query parameter, then built-in default. idle_in_transaction_session_timeout keeps its existing behavior and remains URL/default driven.

@bgentry bgentry force-pushed the bg/expose-cli-timeout-flags branch 4 times, most recently from a70b9f6 to a265da1 Compare February 9, 2026 17:51
River CLI Postgres commands had fixed session defaults and no explicit
flag for statement timeout. For long-running migrations, callers either
accepted the default or had to encode `statement_timeout` into the
connection string. This could be difficult in deployed environments
where i.e. a database connection string was shared with an application
and the user did not want to accidentally affect timeouts for other
processes using a shared connection string.

This commit adds a root `--statement-timeout` flag and thread it through
command bootstrapping into Postgres pool configuration. Statement
timeout now uses explicit precedence: flag value first, then
connection-string query parameter, then built-in default.
`idle_in_transaction_session_timeout` keeps its existing behavior and
remains URL/default driven. Values under 1ms would be truncated to 0 and
are rejected as invalid.
@bgentry bgentry force-pushed the bg/expose-cli-timeout-flags branch from a265da1 to 4a3e207 Compare February 9, 2026 17:52
@bgentry bgentry requested a review from brandur February 9, 2026 17:53
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.

1 participant