cockroachdb / cockroachdb/cockroach

sql: ANALYZE hangs forever if run within a transaction that modifies the table it is analyzing

Open
#93,372 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.