cockroachdb / cockroachdb/cockroach

ldr: create logically replicated table does not correctly resolve database names

Open
#145,444 3 comments 0 reactions 1 assignee Claimed by @jeffswenson View on GitHub
A-cdc A-cross-cluster-replication A-disaster-recovery C-enhancement T-cdc
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

I was attempting to set up LDR for the `indexes` workload and observed the following error.

```
ERROR: crdb_internal.start_replication_stream_for_tables(): relation "indexes.indexes" does not exist (SQLSTATE 42P01)
```

I was running the following statement:

```
CREATE LOGICALLY REPLICATED TABLE "indexes.indexes"
FROM TABLE "indexes.indexes" ON 'external://peer'
WITH OPTIONS (unidirectional, MODE = immediate);
```

I think the problem is name resolution doesn't work correctly if the external connection specifies a database other than the database containing the table. Creating the table worked when I changed the external connection to specify the indexes database.

Jira issue: CRDB-49906

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.