Skip to content

Support field to update pgx QueryExecMode in postgres source #2385

@mzshwanlee

Description

@mzshwanlee

Prerequisites

  • I've searched the current open issues
  • I've updated to the latest version of Toolbox

Toolbox version

toolbox version 0.26.0

Environment

  • Toolbox version: latest
  • OS: Google Cloud Run (Container)
  • Database: AlloyDB for PostgreSQL

Client

ADK

  1. Client: google-adk (Python SDK)
  2. Version: 1.23.0
  3. Example: If possible, please include your code of configuration:
from toolbox_core import ToolboxSyncClient

# MCP Toolbox connection
toolbox = ToolboxSyncClient("https://mcp-toolbox-xxxx-an.a.run.app")

# Load tools
tools = toolbox.load_toolset("catchtable-tools")

# Used with Google ADK Agent
search_agent = Agent(
    model="gemini-2.5-flash",
    name="search_agent",
    tools=[mcp_toolset],  # MCP Toolbox tools
    instruction=SEARCH_INSTRUCTION,
)

Client

sources:
  test:
    kind: "postgres"
    host: "${DB_HOST}"
    port: 5432
    database: "${DB_NAME}"
    user: "${DB_USER}"
    password: "${DB_PASSWORD}"

tools:
  - name: hybrid_search
    source: test
    statement: |
        SELECT * FROM test WHERE ...

Expected Behavior

Query should execute successfully every time.

Current Behavior

Intermittent error:

unable to execute query: ERROR: prepared statement "stmtcache_3d641e2d77e4d76b6364d972493728" does not exist (SQLSTATE 26000)

Steps to reproduce?

  1. Deploy MCP Toolbox to Cloud Run with AlloyDB source
  2. Configure tools.yaml with SQL queries
  3. Execute queries - initially works
  4. Wait for idle period or instance scaling
  5. Execute query again - error occurs

Additional Details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.status: help wantedStatus: Unplanned work open to contributions from the community.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions