You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encountering an error when trying to convert records from a MySQL table containing a full-text index into a Postgres table due to an issue with the index size.
Error Message:
[2024/02/07 14:43:14] [error] target/target.go:361 failed to insert into table fulltext_index_table: ERROR: index row size 7136 exceeds btree version 4 maximum 2704 for index "IDX_fulltext_index_table_fulltext_index_table_data_index" (SQLSTATE 54000). Detail: Index row references tuple (0,1) in relation "fulltext_index_table".
Steps to Reproduce
Create Table in MySQL:
createtablefulltext_index_table
(
id char(36) not nullprimary key,
raw longtext null ,
data longtext collate utf8mb4_bin null,
created_at timestampnull,
updated_at timestampnull,
deleted_at timestampnull
)
engine = InnoDB
collate = utf8mb4_unicode_ci;
create created_at_index
on fulltext_index_table(created_at);
create fulltext index fulltext_index_table_data_index
on fulltext_index_table(data);
Insert random records into the source MySQL table.
The records should be inserted into the fulltext_index_table table on the Postgres target table without encountering any errors related to the index size.
Actual Behavior
Encountering the error mentioned above when attempting to insert records.
The text was updated successfully, but these errors were encountered:
When creating an index in PostgreSQL without specifying the index type, the default and simplest btree index is used. In some cases, especially during migration from MySQL, you might encounter an error:
ERROR: index row size [X] exceeds btree version 4 maximum [Y] for index "[INDEX_NAME]" (SQLSTATE 54000).
Detail: Index row references tuple (0,1) in relation "[TABLE_NAME]".
This error occurs when the size of the indexed field is large, surpassing the maximum limit for a btree index.
To resolve this issue, we need to specify a different index type that can accommodate larger row sizes, such as GiST or GIN for PostgreSQL indexes targeted to eliminate this error.
CREATE INDEX idx_fulltext_index_table
ON fulltext_index_table
USING gin(to_tsvector('english', data));
Summary:
Encountering an error when trying to convert records from a MySQL table containing a full-text index into a Postgres table due to an issue with the index size.
Error Message:
Steps to Reproduce
Create Table in MySQL:
Insert random records into the source MySQL table.
Send stream config to DBConvert Streams API endpoint:
curl --request POST --url http://0.0.0.0:8020/api/v1/streams\?file=./mysql2pg-fulltext_index_table.json
mysql2pg-fulltext_index_table.json contents
Expected Behavior
The records should be inserted into the
fulltext_index_table
table on the Postgres target table without encountering any errors related to the index size.Actual Behavior
Encountering the error mentioned above when attempting to insert records.
The text was updated successfully, but these errors were encountered: