Skip to content

Timeout on idle connection even though scan is done #422

@wdroste

Description

@wdroste

Description:

We're observing that DuckDB completes the PostgreSQL scan relatively quickly (10–20 seconds), but the query itself involves complex joins and unnesting that take several minutes to process entirely within DuckDB. During this processing time, the PostgreSQL connection remains open but idle — it isn't released until the entire query completes.

The problem is that PostgreSQL (or an intermediate proxy/firewall) terminates the idle connection before DuckDB finishes processing, which causes the entire query to fail. Since the scan data has already been fully read into DuckDB at that point, the connection is no longer needed and should ideally be released as soon as the scan phase completes.

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