You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
155774: sql/inspect: add DETACHED option to run INSPECT without waiting r=spilchen a=spilchen
Adds support for running `INSPECT ... WITH OPTIONS (DETACHED)`, which submits the inspection as a background job and returns immediately with the job ID in a notice. This allows INSPECT to run inside a transaction.
**Note to reviewers:**
This was added to support running INSPECT within the random schema workload, which executes statements inside transactions. Previously, INSPECT could not run inside a transaction. It also gives us async behaviour. While expanding INSPECT test coverage, I have wanted to kick off an async run of INSPECT. Until now, I worked around it by using `statement_timeout` to force the job to run in the background so we could later wait on it. The detached option provides a cleaner approach. It is similar to how commands like BACKUP support an async mode.
Informs: #155483
Epic: CRDB-55075
Release note (sql change): INSPECT supports a DETACHED option to run the operation without waiting for it.
Co-authored-by: Matt Spilchen <[email protected]>
0 commit comments