Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: build virtual indexes for all virtual tables which can be indexed by table ID #62930

Open
ajwerner opened this issue Apr 1, 2021 · 0 comments
Labels
A-sql-vtables Virtual tables - pg_catalog, information_schema etc C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@ajwerner
Copy link
Contributor

ajwerner commented Apr 1, 2021

Is your feature request related to a problem? Please describe.

In #47316 we introduced the concept of virtual indexes on virtual tables. These things are great and allow point-lookups for virtual table entries. However, very few virtual tables have these indexes. It'd be great if all of the tables which could have these indexes did.

Additional context

One potentially suspect thing happening with the virtual indexes is that they use leased descriptors opportunistically. This may cause problems in transactions which assume that they can rely on the state of virtual tables for the purpose of constructing schema changes. Fixing this is likely to require making the descriptor table global and skipping the cache.

This is especially wonderful for permitting concurrency between schema changes which operate on the system tables. Perhaps that use case is not realistic in the real world. It is currently being motivated by the schemachange randomized testing workload. It is likely to become more plausible in a world where cockroach supports larger and richer schemas than it does today. Today to create schema elements programatically, at a high rate is likely to cause all manner of problems.

Jira issue: CRDB-6211

@ajwerner ajwerner added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-vtables Virtual tables - pg_catalog, information_schema etc labels Apr 1, 2021
@ajwerner ajwerner added this to Triage in SQL Sessions - Deprecated via automation Apr 1, 2021
@ajwerner ajwerner moved this from Triage to Longer term backlog in SQL Sessions - Deprecated Apr 1, 2021
@rafiss rafiss added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label May 12, 2021
@rafiss rafiss moved this from Longer term backlog to Later in SQL Sessions - Deprecated Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-vtables Virtual tables - pg_catalog, information_schema etc C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
No open projects
Development

No branches or pull requests

2 participants