Issue whenever a requests comes in on CockroachDB 20.2

Hi, after setting up a cluster on CockroachDB 20.2 we’re getting constant errors whenever a request comes in, which prevents any queries from being successfully executed.

pq: internal error: missing fk forward reference "fk_fk_xxx_ref_xxx" to "xxx" from "xxx_table_name"

Is there a way to fix this?

Hi Josh,

I see you posted on the community slack as well.

Let’s follow up there (here’s the link).


Can you post here? Because there is no way to follow this link without an account. I have the same problem.

The Community Slack is open to everyone :slight_smile: You can join with this link.

Also there is a Github issue for this now. That issue currently has the most information on this problem:

Hi all,

A fix for this issue will be available in v20.2.3. We believe that the issue is restricted to clusters that were started on versions 19.1 or earlier, with tables with foreign keys that haven’t undergone schema changes until the 20.2 version.

If you’re experiencing this issue and can roll back to 20.1, we recommend you do that until 20.2.3 is available.

If you urgently need to resolve this issue before v20.2.3 is available, and cannot roll back to 20.1 due to having finalized the upgrade to 20.2, you may use this 20.2.3 pre-release build. This build contains a bugfix for this issue. It is built from tag staging-202011251758-v20.2.3 in the cockroachdb repo. Note that this is not considered an official build, so if you aren’t experiencing an urgent issue, we recommend that you don’t upgrade.