Skip to content

Conversation

iPeluwa
Copy link
Contributor

@iPeluwa iPeluwa commented Sep 10, 2025

  • Implement SET statement_timeout with support for ms, s, min units
  • Add SHOW statement_timeout to display current timeout setting
  • Default to no timeout (disabled) - use SET statement_timeout = 0 to disable
  • Timeout is per-session, not server-wide configuration
  • Supports PostgreSQL standard syntax: SET statement_timeout = '30s'
  • Query execution respects the session timeout in both simple and extended query protocols
  • Added comprehensive tests for timeout setting, showing, and disabling

- Implement SET statement_timeout with support for ms, s, min units
- Add SHOW statement_timeout to display current timeout setting
- Default to no timeout (disabled) - use SET statement_timeout = 0 to disable
- Timeout is per-session, not server-wide configuration
- Supports PostgreSQL standard syntax: SET statement_timeout = '30s'
- Query execution respects the session timeout in both simple and extended query protocols
- Added comprehensive tests for timeout setting, showing, and disabling
- Fixed redundant closure warnings
- Applied clippy pedantic suggestions
- Improved code quality and consistency
…etadata

- Remove statement_timeout field from DfSessionService (was application-scoped)
- Store timeout in ClientInfo::metadata() using METADATA_STATEMENT_TIMEOUT key
- Add helper functions get_statement_timeout() and set_statement_timeout()
- Update SET/SHOW statement_timeout handlers to use client metadata
- Update query execution logic to read timeout from client session
- Add comprehensive MockClient for testing session-specific behavior
- Now each PostgreSQL session has its own independent timeout setting

This follows the PostgreSQL standard where statement_timeout is a session variable,
not a server-wide configuration.
@sunng87 sunng87 merged commit 09a803d into datafusion-contrib:master Sep 10, 2025
6 checks passed
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.

2 participants