Skip to content

fix(iceberg_fdw): [WRA-27] configurable HTTP timeouts for REST catalog#617

Merged
burmecia merged 2 commits into
mainfrom
bo/fix/iceberg-http-timeout
Jul 22, 2026
Merged

fix(iceberg_fdw): [WRA-27] configurable HTTP timeouts for REST catalog#617
burmecia merged 2 commits into
mainfrom
bo/fix/iceberg-http-timeout

Conversation

@burmecia

@burmecia burmecia commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

  • The Iceberg REST catalog client (RestCatalogBuilder::default()) had no request/connect timeout, so a stalled connection to the catalog server hangs the query indefinitely — uninterruptible by statement_timeout/pg_cancel_backend/pg_terminate_backend, pinning OldestXmin and logical replication slot horizons while blocked.
  • Adds new server options request_timeout_ms (default 30000) and connect_timeout_ms (default 10000), and injects a timeout-configured reqwest::Client into RestCatalogBuilder::with_client(...) on the REST catalog path only (S3Tables catalog is unaffected).
  • iceberg-catalog-rest 0.8.0 pins reqwest = "0.12.12", incompatible with the workspace's existing reqwest 0.11.20. Rather than adding a separately-renamed dependency, this bumps reqwest/reqwest-middleware/reqwest-retry/http workspace-wide to versions compatible with 0.12. Surveyed every FDW gating these crates (airtable, auth0, cognito, firebase, logflare, stripe, s3_fdw) — all recompile with no code changes needed.

The Iceberg REST catalog client had no timeout, so a stalled connection
to the catalog server would hang the query indefinitely, uninterruptible
by statement_timeout or pg_cancel_backend, pinning VACUUM/replication
slot horizons in the process (WRA-27).

Adds request_timeout_ms/connect_timeout_ms server options and injects a
timeout-configured reqwest client into RestCatalogBuilder. This requires
bumping reqwest to 0.12 workspace-wide (with matching reqwest-middleware/
reqwest-retry/http bumps) since iceberg-catalog-rest pins reqwest 0.12.12.
Copilot AI review requested due to automatic review settings July 22, 2026 03:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds configurable HTTP connect/request timeouts to the Iceberg REST catalog client to prevent indefinitely hung FDW queries, and updates the workspace’s HTTP client dependencies to reqwest 0.12-compatible versions.

Changes:

  • Add request_timeout_ms (default 30000) and connect_timeout_ms (default 10000) server options and apply them via a timeout-configured reqwest::Client on the REST catalog path.
  • Add a regression pg_test to ensure an unreachable REST catalog fails quickly instead of hanging.
  • Bump reqwest/reqwest-middleware/reqwest-retry/http versions workspace-wide and document the new options.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
wrappers/src/fdw/iceberg_fdw/iceberg_fdw.rs Builds a timeout-configured reqwest client and injects it into the REST catalog builder.
wrappers/src/fdw/iceberg_fdw/mod.rs Adds reqwest error plumbing to the Iceberg FDW error type.
wrappers/src/fdw/iceberg_fdw/tests.rs Adds a regression test to assert REST-catalog unreachability is bounded by timeouts.
wrappers/Cargo.toml Enables reqwest for iceberg_fdw and bumps reqwest/http-related dependency versions.
docs/catalog/iceberg.md Documents the new timeout server options and defaults.
Cargo.lock Locks updated dependency graph from the reqwest/http version bumps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wrappers/src/fdw/iceberg_fdw/iceberg_fdw.rs Outdated
Comment thread wrappers/src/fdw/iceberg_fdw/tests.rs Outdated
Comment thread wrappers/src/fdw/iceberg_fdw/tests.rs Outdated
- Read request_timeout_ms/connect_timeout_ms from the vault-decrypted
  props map instead of raw server.options, so vault_-prefixed keys
  aren't silently ignored.
- Use an RFC 5737 TEST-NET address (192.0.2.1) instead of an RFC 1918
  address in the timeout test, since the latter can be routable in
  some CI/VPC environments.
@burmecia burmecia changed the title fix(iceberg_fdw): configurable HTTP timeouts for REST catalog fix(iceberg_fdw): [WRA-27] configurable HTTP timeouts for REST catalog Jul 22, 2026
@burmecia
burmecia requested a review from imor July 22, 2026 05:23
@burmecia
burmecia merged commit 46288b5 into main Jul 22, 2026
11 checks passed
@burmecia
burmecia deleted the bo/fix/iceberg-http-timeout branch July 22, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants