yugabyte / yb-voyager

Data migration Engine for YugabyteDB database
38 stars 10 forks source link

[Voyager] Voyager not reporting an issue during analyze-schema that is hit during import schema #1867

Open jlisthood opened 6 days ago

jlisthood commented 6 days ago

Jira Link: DB-13973

Description

Context: YB-Voyager Version: GIT_COMMIT_HASH=4f3afcd389cac1236f0051c38215ae360420fb3e, VERSION=1.8.5-rc1 YB Version: 2024.1.3.0

Issue: During an offline migration, the schema analysis showed no issues:

Issues
------- 
No issues found.

However, during schema import, I hit an issue on an index:

ERROR: INDEX on column of type 'user_defined_type' not yet supported (SQLSTATE 0A000)
error in importing schema: ERROR: INDEX on column of type 'user_defined_type' not yet supported (SQLSTATE 0A000)

Turns out this is due to a table that has a constraint on a datarange:

CREATE TABLE public.a (
    a1 uuid NOT NULL,
    a2 character varying(6) NOT NULL,
    a3 daterange NOT NULL,
    a4 timestamp with time zone NOT NULL,
    a5 timestamp with time zone NOT NULL,
    a6 uuid NOT NULL
);

ALTER TABLE ONLY public.a
    ADD CONSTRAINT a_uniq UNIQUE (a1, a3);

It seems like a bug that this issue was not found during schema analysis. Also, the error message seems odd since daterange is not a user-defined type in Postgres as far as I am aware - please let me know if I am mistaken

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

hbhanawat commented 4 days ago

Target release for the Voyager fix: 1.8.6 (Tentative date: 26th November). After the fix lands, Voyager will report indexes on daterange datatypes in the analyze report.

@m-iancu FYI - PTAL for the index support on daterange datatypes. cc: @prasad-rad