sql/inspect: skip REFCURSOR stored columns in consistency check#155772
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Oct 22, 2025
Merged
Conversation
Member
fqazi
approved these changes
Oct 22, 2025
Collaborator
fqazi
left a comment
There was a problem hiding this comment.
One minor suggestion
@fqazi reviewed 2 of 2 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @spilchen)
pkg/sql/inspect/index_consistency_check.go line 126 at r1 (raw file):
col := c.tableDesc.PublicColumns()[pos] otherColumns = append(otherColumns, col) if col.GetType().Family() != types.RefCursorFamily {
Nit: Lets just have it return for refcursor instead?
REFCURSOR values cannot be compared for equality, which breaks the `INSPECT` command when an index stores a column of this type. During a consistency check, INSPECT attempts to compare stored column payloads between the primary and secondary indexes. This fails for REFCURSOR values because the column type cannot be used in an equality comparison. This change skips REFCURSOR stored columns during the primary/secondary comparison. Informs: cockroachdb#155676 Epic: CRDB-55075 Release note (bug fix): INSPECT can now be run on tables with indexes that store REFCURSOR-typed columns.
ae84d63 to
f9aa66a
Compare
spilchen
commented
Oct 22, 2025
Contributor
Author
spilchen
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @fqazi)
pkg/sql/inspect/index_consistency_check.go line 126 at r1 (raw file):
Previously, fqazi (Faizan Qazi) wrote…
Nit: Lets just have it return for refcursor instead?
Done
Contributor
Author
|
TFTR! bors r+ |
Contributor
rishabh7m
added a commit
to crltest-issue-syncing/cockroach-fork
that referenced
this pull request
Nov 20, 2025
rishabh7m
added a commit
to crltest-issue-syncing/cockroach-fork
that referenced
this pull request
Nov 21, 2025
rishabh7m
added a commit
to crltest-issue-syncing/cockroach-fork
that referenced
this pull request
Nov 21, 2025
rishabh7m
added a commit
to crltest-issue-syncing/cockroach-fork
that referenced
this pull request
Dec 1, 2025
rishabh7m
added a commit
to crltest-issue-syncing/cockroach-fork
that referenced
this pull request
Dec 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
REFCURSOR values cannot be compared for equality, which breaks the
INSPECTcommand when an index stores a column of this type. During a consistency check, INSPECT attempts to compare stored column payloads between the primary and secondary indexes. This fails for REFCURSOR values because the column type cannot be used in an equality comparison.This change skips REFCURSOR stored columns during the primary/secondary comparison.
Informs: #155676
Epic: CRDB-55075
Release note (bug fix): INSPECT can now be run on tables with indexes that store REFCURSOR-typed columns.