Skip to content

Keep an open transaction visible, with Commit and Roll Back #3669

Closed

Description

@datlechin

Problem

After BEGIN in a query tab, the transaction stays open on that connection until the user types COMMIT or ROLLBACK. While it is open, other work joins it: "a grid save and a Users & Roles apply land inside it" (features/sql-editor.mdx, "Which transaction the batch runs in"). An MCP client's begin opens one the same way. Nothing on screen keeps saying so.

What each app shows today:

  • macOS: the run that leaves the transaction open ends with "The transaction on this connection is still open. Commit or roll it back." (apple/TablePro/Core/Services/Execution/PluginSessionTransactionState+Execution.swift:46). It is part of that one result. Closing or disconnecting asks first (apple/TablePro/Core/Services/Infrastructure/ConnectionCloseAction.swift:56, ConnectionDisconnectAction.swift:51). There is no indicator on other tabs and no Commit or Roll Back control.
  • iOS: the same one-time notice (apple/TableProMobile/TableProMobile/ViewModels/QueryEditorViewModel.swift:175).
  • Linux: a "Transaction open" line above the results and a mark on the editor tab (linux/crates/app/src/ui/editor/transaction_dirty.rs:20), and closing asks first. There is no Commit or Roll Back control, and other tabs show nothing.

Proposed solution

  • While a session holds a transaction, show an indicator that stays on every tab of that connection, naming the connection and database, with Commit and Roll Back. When the transaction can no longer commit, show only Roll Back, matching today's notice.
  • Mark the connection's entry on the connections strip (macOS) so it shows from another connection too.
  • Update it after every editor run, grid save, MCP transaction_control call and reconnect. A lost session clears it.
  • Run Commit and Roll Back on the same session the transaction lives on.
  • Linux: add the two buttons next to the existing line and show it on every tab of the connection.

Engines that report their session state get it: PostgreSQL, Redshift, CockroachDB, MySQL, MariaDB, TiDB, SQLite, DuckDB, SQL Server and Oracle (features/sql-editor.mdx).

Done when, after BEGIN in one tab, every tab of that connection shows the indicator until the transaction ends by button or by typed SQL, on each app, with tests for the state changes.

Alternatives considered

Type COMMIT or ROLLBACK in the query tab, and remember which tab and connection holds the transaction.

Platform

All

Related database type

N/A / General

Activity

  1. added
    enhancement
    platform-macos
    platform-ios
    platform-linux
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplatform-iosplatform-linuxplatform-macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions