cockroachdb / cockroachdb/cockroach
sql: ANALYZE hangs forever if run within a transaction that modifies the table it is analyzing
Open
C-bug
O-pg-regress
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
The following sequence hangs forever. I guess we should ban ANALYZE in open transactions, or otherwise solve this, though it doesn't seem hugely important...
```
demo@127.0.0.1:26257/defaultdb> create table a (a int);
demo@127.0.0.1:26257/defaultdb> begin;
demo@127.0.0.1:26257/defaultdb OPEN> insert into a values(1);
demo@127.0.0.1:26257/defaultdb OPEN> analyze a;
```
Jira issue: CRDB-22399
Contributor guide
Assessment
This issue has not been assessed yet.