Skip to content

Fix search_path used for planning DeferredChunkAppend chunk queries - #10818

Merged
svenklemm merged 1 commit into
mainfrom
sven/dca_search_path
Oct 14, 2026
Merged

svenklemm merged 1 commit into
mainfrom
sven/dca_search_path

Conversation

@svenklemm

Copy link
Copy Markdown
Member

DeferredChunkAppend planned each per-chunk query with search_path
restricted to pg_catalog and pg_temp. Any user code that runs during
planning saw that search_path, so unqualified names from other schemas
could not be found. For example, inlining a SQL function whose body
uses an extension operator in public failed with "operator does not
exist".

Restrict search_path only while parsing the per-chunk query and plan
it with the caller's search_path.

Fixes #10817

@github-actions

Copy link
Copy Markdown

@pnthao, @natalya-aksman: please review this pull request.

Powered by pull-review

@svenklemm svenklemm added this to the v2.31.0 milestone Oct 14, 2026
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.

πŸ“’ Thoughts on this report? Let us know!

DeferredChunkAppend planned each per-chunk query with search_path
restricted to pg_catalog and pg_temp. Any user code that runs during
planning saw that search_path, so unqualified names from other schemas
could not be found. For example, inlining a SQL function whose body
uses an extension operator in public failed with "operator does not
exist".

Restrict search_path only while parsing the per-chunk query and plan
it with the caller's search_path.

Fixes #10817
@svenklemm
svenklemm force-pushed the sven/dca_search_path branch from faffb44 to 3212ca8 Compare October 14, 2026 07:59
@svenklemm svenklemm added the force-auto-backport Automatically backport this PR or fix of this issue, even if it's not marked as "bug" label Oct 14, 2026
@svenklemm
svenklemm merged commit 44e168b into main Oct 14, 2026
72 of 74 checks passed
@svenklemm
svenklemm deleted the sven/dca_search_path branch October 14, 2026 13:16
@timescale-automation

Copy link
Copy Markdown
Member

Automated backport to 2.30.x not done: the milestone 'v2.31.0' does not match the release branch.

Job log

@timescale-automation timescale-automation added the auto-backport-not-done Automated backport of this PR has failed non-retriably (e.g. conflicts) label Oct 14, 2026
@svenklemm svenklemm removed the auto-backport-not-done Automated backport of this PR has failed non-retriably (e.g. conflicts) label Oct 14, 2026
@timescale-automation timescale-automation added the released-2.32.0 Released in 2.32.0 label Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported-2.31.x force-auto-backport Automatically backport this PR or fix of this issue, even if it's not marked as "bug" released-2.31.0 Released in 2.31.0 released-2.32.0 Released in 2.32.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: DeferredChunkAppend breaks SQL functions that use extension operators ("operator does not exist ... during inlining")

4 participants