Conversation
…ult. Put datname in double quotes when setting search_path. Set search path immediately before executing other commands.
matthewnolf
approved these changes
Feb 2, 2026
cristiangreco
approved these changes
Feb 2, 2026
Draft
grafana-alloybot bot
pushed a commit
that referenced
this pull request
Feb 12, 2026
### Brief description of Pull Request During dogfooding we discovered some cases where explain plans were failing to run due to missing or ambiguous schema names. This PR addresses several small issues with the `SET search_path` command which is meant to address these issues. ### Pull Request Details - Sets the search path first, before any other requests are issued, including creating the prepared statement. - Places the datname in double quotes to prevent syntax errors - Explicitly sets the search path for SESSION rather than depending upon the default. ### PR Checklist - [x] Tests updated (cherry picked from commit 0044e03)
1 task
cristiangreco
pushed a commit
that referenced
this pull request
Feb 12, 2026
… for postgres explain plans [backport] (#5520) ## Backport of #5422 This PR backports #5422 to release/v1.13. ### Original PR Author @rgeyer ### Description ### Brief description of Pull Request During dogfooding we discovered some cases where explain plans were failing to run due to missing or ambiguous schema names. This PR addresses several small issues with the `SET search_path` command which is meant to address these issues. ### Pull Request Details - Sets the search path first, before any other requests are issued, including creating the prepared statement. - Places the datname in double quotes to prevent syntax errors - Explicitly sets the search path for SESSION rather than depending upon the default. ### PR Checklist - [x] Tests updated --- *This backport was created automatically.* Co-authored-by: Ryan Geyer <me@ryangeyer.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief description of Pull Request
During dogfooding we discovered some cases where explain plans were failing to run due to missing or ambiguous schema names.
This PR addresses several small issues with the
SET search_pathcommand which is meant to address these issues.Pull Request Details
PR Checklist