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
- 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.
- 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
- Why Is There No Available Evaluation Project During Migration Project Creation?
- When Should I Use the Conversion Config Function?
- What Should I Do If SQL Modifications Failed to Be Saved During Object Correction?
- Why Is a Name Error Reported During Database Migration?
- How Do I Solve ERROR: syntax error at or near "@"?
- What Is the Impact of the Migration on the Source Database?
- What Are the Impacts of GUC Parameter Settings of GaussDB on Migration?
- Why Is the Number of Indexes Different After Oracle Data is Migrated to GaussDB?
- What Should I Do If There Are ctid, xc_node_id, and tableoid Columns in GaussDB?
- Why Is Data Inconsistent When SELECT Statements Without ORDER BY Are Used for Query in Distributed GaussDB?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore