Help Center> Database and Application Migration UGO> FAQs> Migration Project> What Should I Do If There Are ctid, xc_node_id, and tableoid Columns in GaussDB?
Updated on 2024-06-11 GMT+08:00

What Should I Do If There Are ctid, xc_node_id, and tableoid Columns in GaussDB?

Symptom

To migrate a heterogeneous database to GaussDB, you need to manually rename the ctid, xc_node_id, tableoid, and ctrd columns.

Causes

There are the system columns ctid, xc_node_id, tableoid, and ctrd both in GaussDB and the source database. You need to manually rename these columns when migrating data to GaussDB.

Solution

  1. Run the following command to connect to the GaussDB database:

    gsql -U username -d database -p 4000 -W pwd

    In the preceding command, username indicates the database username, database indicates the database name, and pwd indicates the password of the username.

  2. Run the following SQL statement to rename the columns ctid, xc_node_id, tableoid, and ctrd:

    create table test("CTRD" int);

    create table test("XC_NODE" int);

    create table test("TABLEO" int);

    create table test("CTRD" int);

Migration Project FAQs

more