sql: build virtual indexes for all virtual tables which can be indexed by table ID #62930
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
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
The text was updated successfully, but these errors were encountered: