Open frozenspider opened 2 years ago
This is partially fixed in da68239b350550c76658d9ebc08a69acd4a805ad: after this commit, local cache will be updated. Other sessions won't know a new object is pinned though. This is a minor issue because at worst it could cause unnecessary dependencies to be recorded.
Jira Link: DB-2456 In #3503 we introduced a dedicated cache to speedup lookups for pinned objects. It assumed that pinned object set is immutable.
However, YSQL upgrade changed that invariant, now we do direct
pg_depend
inserts as part of various migrations (e.g. new system functions definition). However, YSQL upgrade didn't update that cache properly, leading to a system catalog content mismatch when a new system function was defined in the same session as creating a view using that (pinned) function, given that cache was initialized already. We didn't define such system views before, so we didn't encounter the described behaviour in practice.