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 2025-12-23 GMT+08:00

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

Symptom

To migrate data from a heterogeneous database to GaussDB, you need to manually rename columns such as ctid, xc_node_id, tableoid, and ctrd.

Possible Causes

System columns ctid, xc_node_id, and tableoid are in the GaussDB and source databases. You need to manually rename these columns during migration 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 statements to rename columns CTID, XC_NODE_ID, and TABLEOID:

    create table test("CTID" int);

    create table test("XC_NODE_ID" int);

    create table test("TABLEOID" int);