forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opt: fix cached plan invalidation with some virtual tables
It turns out that many virtual tables (e.g. in `pg_catalog` schema) have instances for each catalog (and the context differs within each catalog). Unfortunately, these instances all share the same virtual table ID. This violates our assumptions and prevents us from invalidating cached plans properly. This change fixes this by also putting the database ID in the StableID for virtual tables. Note that the situation is in fact even worse: all virtual tables have the *same* ID. This is being addressed separately (cockroachdb#33697, cockroachdb#32963). Fortunately this doesn't currently cause problems in practice because virtual tables have static names and can't be involved in FKs. Release note: None
- Loading branch information
1 parent
a968c44
commit fb7c959
Showing
3 changed files
with
68 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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