The SHOW INSPECT ERRORS statement displays errors recorded by an INSPECT job.
SHOW INSPECT ERRORS shows results for a single INSPECT job at a time; it does not aggregate results across jobs. By default, it returns errors from the most recent completed, successful INSPECT job for the specified table. To view errors from a specific job, use SHOW INSPECT ERRORS FOR JOB {job_id}.
Required privileges
To run SHOW INSPECT ERRORS, the user must have:
- The
INSPECTsystem-level privilege, which is required to run theINSPECTstatement. - The
VIEWSYSTEMTABLEsystem-level privilege, which is required to view the output ofSHOW INSPECT ERRORS.
Synopsis
Parameters
| Parameter | Syntax | Description |
|---|---|---|
opt_for_table_clause |
FOR TABLE {table_name} |
Optional. Show errors for the specified table. |
opt_for_job_clause |
FOR JOB {job_id} |
Optional. Show errors produced by the job ID returned by the INSPECT statement. |
opt_with_details |
WITH DETAILS |
Optional. Include structured error metadata from the details column (JSON) in the results. |
Response
SHOW INSPECT ERRORS returns the following columns, with one row per issue detected.
| Field | Description |
|---|---|
job_id |
The ID of the INSPECT job that detected the issue. |
error_type |
The type of inconsistency detected. For more information, see Error types. |
aost |
The AS OF SYSTEM TIME timestamp used by the validation job (if any). |
database_name |
The database containing the schema object with an issue. |
schema_name |
The schema containing the object with an issue. |
object_name |
The table or index with an issue. |
primary_key |
The primary key of the row involved in the issue, if applicable. |
details |
This column is present only if WITH DETAILS is specified. It contains structured metadata (JSON) describing the issue. |
Error types
The INSPECT implementation reports the following error_type values:
| Error type | Meaning |
|---|---|
missing_secondary_index_entry |
A row in the primary index is missing a corresponding entry in a secondary index. If you see this error, contact Support. |
dangling_secondary_index_entry |
A secondary index entry exists, but the referenced primary index row does not. If you see this error, contact Support. |
internal_error |
An error occurred while INSPECT was running its validation queries (for example, an MVCC GC timeout). The cause of this error type is usually not related to data validity. Investigate the underlying job error details and cluster logs to determine the cause before deciding whether to contact Support. |
Examples
Show the latest errors for a table
SHOW INSPECT ERRORS FOR TABLE movr.public.users;
Show errors for a specific inspection job
When you issue the INSPECT statement, a NOTICE message is returned to the client showing the job ID, e.g.,
INSPECT TABLE movr.public.users AS OF SYSTEM TIME '-10s';
NOTICE: waiting for INSPECT job to complete: 1141477013029322753
If the statement is canceled, the job will continue in the background.
To show errors for a job, issue the following statement:
SHOW INSPECT ERRORS FOR JOB 1141477013029322753;
If there are no errors associated with that job ID, the output is:
SHOW INSPECT ERRORS 0
Note that if you issue a job ID for a nonexistent job, you will see the same output as for a job with no errors:
SHOW INSPECT ERRORS FOR JOB 0;
SHOW INSPECT ERRORS 0
Show errors with details
SHOW INSPECT ERRORS FOR TABLE movr.public.users WITH DETAILS;