Repository navigation
fix(pg): closing a browser or stats view releases its lease without interrupting the shared session (#1237) - #1244
Merged
Conversation
…nterrupting the shared session (#1237) Index, trigger, type, extension and FDW list views, and the stats view, force-closed the shared read-only session when they were closed mid-load. Every other query on that session then failed. Their dispose now only releases the lease, as the table, sequence and routine views already do.
Closed
2 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #1237. Part of #1212.
Problem
Closing one of the PostgreSQL browser views (index, trigger, type, extension, FDW lists) or the stats view while it was loading called
PostgresService.interrupt. That force-closed the shared read-only session, so queries from the object tree, other views and MCP failed.Change
dispose()in the five list views (postgres_browser_views.dart). Each now releases its lease only.PostgresStatsView:_disconnectCurrentloses itsinterruptIfBusyparameter and only releases the lease. This matches the table, sequence and routine views (fix(db): closing a table tab force-closes the read-only session other views are using #1215, fix(pg): closing a sequence or routine view releases its lease without interrupting the shared session (#1215) #1236).Tests
No new test. The fix removes a call, and the singleton pool cannot be faked without a live PostgreSQL, which CI does not provide. The acceptance check "closing while loading leaves the shared session intact" is not covered by a test; it was checked by reading the code. Existing tests run in CI.