Skip to content

feat: #421 Adds two new extension options to configure Postgres timeo…#425

Merged
staticlibs merged 3 commits intoduckdb:mainfrom
brinqa:feat/support-timeouts-on-parallel-scans
Mar 30, 2026
Merged

feat: #421 Adds two new extension options to configure Postgres timeo…#425
staticlibs merged 3 commits intoduckdb:mainfrom
brinqa:feat/support-timeouts-on-parallel-scans

Conversation

@wdroste
Copy link
Copy Markdown
Contributor

@wdroste wdroste commented Mar 29, 2026

Added extensions to support timeouts:

  • pg_statement_timeout: Postgres statement timeout in milliseconds to set on scan connections
  • pg_idle_in_transaction_timeout: Postgres idle in transaction timeout in milliseconds to set on scan connections

Copy link
Copy Markdown
Collaborator

@staticlibs staticlibs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Added 2 nits. And please remove changes to duckdb and extension-ci-tools submodules, I would think they are accidental.

"Whether or not to use TEXT protocol to read data. This is slower, but provides better "
"compatibility with non-Postgres systems",
LogicalType::BOOLEAN, Value::BOOLEAN(false));
config.AddExtensionOption("pg_statement_timeout",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename pg_statement_timeout to pg_statement_timeout_millis? And likewise the second option.

LogicalType::BOOLEAN, Value::BOOLEAN(false));
config.AddExtensionOption("pg_statement_timeout",
"Postgres statement timeout in milliseconds to set on scan connections",
LogicalType::BIGINT, Value());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to change the type to either INTEGER or UINTEGER.

@wdroste wdroste force-pushed the feat/support-timeouts-on-parallel-scans branch 2 times, most recently from 09f227e to c68a9da Compare March 30, 2026 19:41
@wdroste wdroste force-pushed the feat/support-timeouts-on-parallel-scans branch from c68a9da to 63700ea Compare March 30, 2026 19:49
@wdroste wdroste requested a review from staticlibs March 30, 2026 19:51
reader.reset();
connection = PostgresConnection();
pool_connection = PostgresPoolConnection();
no_connection = true;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this bit from this PR? I believe it belongs to #423.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely sorry must be juggling to much today. Thank you for your patience.

@staticlibs staticlibs merged commit abb4c5b into duckdb:main Mar 30, 2026
15 checks passed
@staticlibs
Copy link
Copy Markdown
Collaborator

Thanks!

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