Guide / Evaluation essentials

A Cancel Request Is Not Proof That a Query Stopped

A user closes a report window because the query is taking too long. The interface disappears, but the operations team still needs to know what happened to the database command…

A user closes a report window because the query is taking too long. The interface disappears, but the operations team still needs to know what happened to the database command. During a distributed SQL evaluation, cancellation should be assessed as a complete client-to-database interaction rather than inferred from a button or a successful request submission.

Distinguish stopping the user’s wait from requesting cancellation and observing the command’s outcome. These are different events, and the application should explain which one it actually knows has happened.

Define what the cancel control promises

Consider a hypothetical reporting service whose cancel button removes the current progress display. Does it promise to hide the result, stop waiting for it, request database cancellation, or confirm that processing has ended? The product owner should choose a clear meaning rather than let different teams assume different promises.

This is particularly important when a result could still arrive after the user leaves the screen. Decide whether that result should be discarded, saved for later, or surfaced in another view. Those are application choices. A database’s cancellation API does not decide the intended experience or establish that every layer propagates the user’s action.

Follow the documented client boundary

PostgreSQL 18’s libpq cancellation documentation explicitly distinguishes successful dispatch of a cancel request from its effect. Dispatch does not guarantee that the command will be canceled; for example, the server may already have finished processing it. The application must observe the relevant command result rather than treat dispatch as completion evidence.

That is a scoped example for PostgreSQL’s client library. Other drivers, frameworks, and database products need their own review. The important comparison is whether the proposed application’s cancellation path makes its actual outcome understandable, including a command that finishes close to the cancellation request.

Describe each state without overstating certainty

The following proposed state map can help a product and technical team agree on what the user and operator should see. It does not prescribe a client API implementation.

Observed event What can be stated What still needs evidence
User leaves the view The user stopped viewing progress Whether database work ended
Client stops waiting This client is no longer awaiting the response What happened to the command
Cancel request dispatched A cancellation request was sent Whether it took effect
Command outcome observed The recorded result explains that command Any separate application cleanup
Business request closed The application applied its closure rule Effects outside that rule’s scope

The distinction is not an argument for a complicated interface. It is a reason to avoid displaying a definitive stopped message when the application only knows that it submitted a request.

Include the near-completion case

A proposed acceptance exercise should cover cancellation while work is still active and cancellation near the time a command completes. Ask the implementer to show the actual client result and the state presented to the user. A demonstration that only removes a loading indicator leaves the central question unanswered.

Also clarify what happens when the cancellation path cannot produce a definite outcome. An application may need an unresolved state and an operator investigation path rather than guessing that the command either completed or stopped. Keep this separate from a business request to reverse an already completed operation. Canceling work in progress and undoing its business effect are different requirements.

Evaluate OceanBase through the real client stack

OceanBase Database is a distributed database candidate with Oracle and MySQL compatibility positioning. A buyer should evaluate the chosen mode, driver, framework, and deployment together for the application’s cancellation behavior. PostgreSQL’s libpq example is not evidence that OceanBase uses the same API or that every compatible client behaves identically.

Retained MySQL or PostgreSQL deployments can provide useful baselines using the same user action and expected application state. Compare what each proposed implementation can actually demonstrate, including how an operator links the cancellation request to the original command. Do not infer resource-release timing or a performance benefit from the presence of a cancel control alone.

Close the business request on its own terms

For a read-only report, closing the request might mean discarding any later result. For another workflow, it might mean keeping a completion record available to the user. The application owner should define that behavior explicitly and ensure the interface wording matches the evidence available.

No queries or cancellations have been executed for this article. The suggested review is intended to make a product comparison concrete: identify the user’s promise, follow the cancellation path, observe the command outcome, and apply the agreed business closure. A sent request can be an important step without being the final answer about whether the work stopped.

Editorial disclosure
This article is based on documented sources and editorial analysis. Proposed evaluation examples are not independently measured benchmark results.

Sources & further reading

Use this guide as a starting point. Define and test the requirements of your own workload before selecting a product.

Related research