Skip to content

Support statement_timeout and idle_in_transaction_timeout on parallel scan connections #421

@wdroste

Description

@wdroste

Description:

Need two new extension options to configure Postgres timeout settings on parallel scan connections:

  • pg_statement_timeout — sets statement_timeout (in milliseconds) on each scan connection
  • pg_idle_in_transaction_timeout — sets idle_in_transaction_session_timeout (in milliseconds) on each scan connection

Currently, when DuckDB opens parallel connections to Postgres for scanning, there is no way to control timeout behavior on those connections. This can lead to long-running or stuck queries on the Postgres side, particularly under load or when scans are interrupted.

Usage:

  SET pg_statement_timeout=5000;
  SET pg_idle_in_transaction_timeout=10000;
  SELECT * FROM postgres_db.my_table;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions