sql: AS OF SYSTEM TIME doesn't support dropped databases at timestamps prior to the drop time #51380
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
Currently,
AS OF SYSTEM TIME
can be used to read historical data in a dropped table prior to the drop time, provided that the database still exists. However, if the database containing the table was dropped, AOST no longer works because name resolution fails during planning:As I understand it, we don't make any provisions for accessing older versions of database descriptors. The database cache is just a name to ID mapping that attempts to store the latest version, and we fall back to reading the database descriptor from KV otherwise. To support this functionality, we'll need database descriptor leasing.
Jira issue: CRDB-4058
The text was updated successfully, but these errors were encountered: