cockroachdb / cockroachdb/cockroach
internal error when using AOST before the existence of system table.
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Describe the problem**
```
demo@127.0.0.1:26257/movr> select version();
version
---------------------------------------------------------------------------------------------------------------------------
CockroachDB CCL v23.1.0-alpha.4-185-gb0e5507f74c-dirty (x86_64-apple-darwin22.3.0, built 2023/02/28 09:15:37, go1.19.4)
(1 row)
Time: 1ms total (execution 1ms / network 0ms)
demo@127.0.0.1:26257/movr> SELECT 1 FROM system.jobs AS OF SYSTEM TIME '1';
ERROR: internal error: referenced descriptor ID 1: descriptor not found
SQLSTATE: XX000
DETAIL: stack trace:
github.com/cockroachdb/cockroach/pkg/sql/catalog/errors.go:90: init()
GOROOT/src/runtime/proc.go:6348: doInit()
GOROOT/src/runtime/proc.go:6325: doInit()
GOROOT/src/runtime/proc.go:6325: doInit()
GOROOT/src/runtime/proc.go:6325: doInit()
GOROOT/src/runtime/proc.go:6325: doInit()
GOROOT/src/runtime/proc.go:6325: doInit()
GOROOT/src/runtime/proc.go:6325: doInit()
GOROOT/src/runtime/proc.go:6325: doInit()
GOROOT/src/runtime/proc.go:6325: doInit()
GOROOT/src/runtime/proc.go:6325: doInit()
GOROOT/src/runtime/proc.go:233: main()
GOROOT/src/runtime/asm_amd64.s:1594: goexit()
HINT: You have encountered an unexpected error.
Please check the public issue tracker to check whether this problem is
already tracked. If you cannot find it there, please report the error
with details by creating a new issue.
If you would rather not post publicly, please contact us directly
using the support form.
We appreciate your feedback.
```
Getting an error isn't unexpected as I've specified a AOST before the existence of the system table. But it might be nice if I got one closer to:
```
> SELECT 1 FROM movr.foo AS OF SYSTEM TIME '1';
ERROR: relation "movr.foo" does not exist
SQLSTATE: 42P01
```
Jira issue: CRDB-24912
Contributor guide
Assessment
This issue has not been assessed yet.