Skip to content

fix: Reset pooled connections to drop leaked session GUCs and HypoPG … - #213

Open
Xxxgy0933 wants to merge 1 commit into
crystaldba:mainfrom
Xxxgy0933:main
Open

Xxxgy0933 wants to merge 1 commit into
crystaldba:mainfrom
Xxxgy0933:main

Conversation

@Xxxgy0933

Copy link
Copy Markdown

…indexes

Pooled backends reused by execute_query kept session GUCs after COMMIT and leftover HypoPG indexes after hypothetical-index analysis. Later MCP requests that hit the same PID inherited that state. Give AsyncConnectionPool a reset callback that runs DISCARD ALL outside a transaction and, if HypoPG is installed, schema-qualified hypopg_reset(). Cleanup errors propagate so the pool discards the connection. Combine DTA hypopg_create_index and hypopg_list_indexes into one checkout so size estimates still work after reset-on-return.

Closes #203

…indexes

Pooled backends reused by execute_query kept session GUCs after COMMIT
and leftover HypoPG indexes after hypothetical-index analysis. Later
MCP requests that hit the same PID inherited that state.
Give AsyncConnectionPool a reset callback that runs DISCARD ALL outside
a transaction and, if HypoPG is installed, schema-qualified hypopg_reset().
Cleanup errors propagate so the pool discards the connection.
Combine DTA hypopg_create_index and hypopg_list_indexes into one
checkout so size estimates still work after reset-on-return.

Closes crystaldba#203
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.

Pooled connections leak session state across MCP requests

1 participant