← Back to Papercuts
CNS-64DoneHigh

Cancel button doesn't work for running SUBSCRIBE in the console shell

## Bug The "Cancel" button in the console shell does not successfully cancel a running `SUBSCRIBE` query. Users are forced to refresh the page to stop the subscribe, which likely leaves orphaned subscribe connections running in the background. This also affects hung queries more broadly — when a query hangs and the Query Insights notice appears, the cancel button still doesn't work and users are forced to refresh the console to recover. ## Symptoms * Clicking the cancel/stop button during a `SUBSCRIBE` has no visible effect * The query continues running * Workaround is refreshing the page, but this may not actually cancel the backend query * Also observed: canceling a subscribe throws an error in the UI (rather than a clean cancellation) * When a query hangs and the Query Insights notice surfaces, cancel is also non-functional — refresh is the only escape ## Impact * Blocks demos (reported during a FanDuel demo on 2026-05-08) * Poor UX for anyone iterating on subscribe queries in the shell * Potential for resource leaks if page-refresh doesn't clean up the backend subscribe or hung query * Broader than just SUBSCRIBE — any hung query that triggers the Query Insights notice is affected ## References * [Slack: Nate Stewart reports cancel doesn't work during FanDuel demo (2026-05-08)](<https://materializeinc.slack.com/archives/CU7ELJ6E9/p1778245918277839>) — includes Loom recording * [Slack: Moritz Hoffmann reports cancel button does nothing for subscribes in console (Jan 2026)](<https://materializeinc.slack.com/archives/CU7ELJ6E9/p1768307091991059>) * [Slack: Frank McSherry — console wedged, cancel unresponsive during high-frequency subscribe (Mar 2026)](<https://materializeinc.slack.com/archives/C08ACQNGSQK/p1773067015046449>) * [GitHub: console#2191](<https://github.com/MaterializeInc/console/issues/2191>) — original issue filed in 2024 ## Notes Console currently calls `pg_cancel_backend()` to cancel queries. In at least one case, cancellation worked in the console but not in psql — suggesting the issue may be inconsistent. Worth investigating whether the failure is SUBSCRIBE-specific or affects all long-running queries.

May PapercutsView in Linear

No prototypes yet. Click "Generate Fix" to create one.